From 9d9725144dd5d16ec7cde58f0afa50218242da1a Mon Sep 17 00:00:00 2001 From: Kai Gerken Date: Sun, 19 Mar 2023 19:31:05 +0100 Subject: [PATCH 1/5] Fix compile error on pzemdc.h (#4583) --- esphome/components/pzemdc/pzemdc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/components/pzemdc/pzemdc.h b/esphome/components/pzemdc/pzemdc.h index 21676e3422..b91ab4c0a5 100644 --- a/esphome/components/pzemdc/pzemdc.h +++ b/esphome/components/pzemdc/pzemdc.h @@ -1,5 +1,6 @@ #pragma once +#include "esphome/core/automation.h" #include "esphome/core/component.h" #include "esphome/components/sensor/sensor.h" #include "esphome/components/modbus/modbus.h" From 8d3896172d8a0fe3c7384b42b40f7b31599ccc05 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 22 Mar 2023 20:56:02 +1300 Subject: [PATCH 2/5] Swap curly brackets for round on LockGuard (#4610) --- esphome/core/helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index a107b1b849..8950cc3b8a 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -547,7 +547,7 @@ class Mutex { */ class LockGuard { public: - LockGuard(Mutex &mutex) : mutex_{mutex} { mutex_.lock(); } + LockGuard(Mutex &mutex) : mutex_(mutex) { mutex_.lock(); } ~LockGuard() { mutex_.unlock(); } private: From 74fe135c9ca5a58e331b3eeffda67b50b5b47005 Mon Sep 17 00:00:00 2001 From: guillempages Date: Wed, 22 Mar 2023 09:05:09 +0100 Subject: [PATCH 3/5] Fix animation resizing (#4608) Animation resizing in RGB24 format is causing an error "Image cannot be resized to a bigger size". Other image types do not show the issue, and the only difference is the "image.thumbnail" call. Removed the call and tested; the animation is shown with the desired size. --- esphome/components/animation/__init__.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/esphome/components/animation/__init__.py b/esphome/components/animation/__init__.py index ce9f057496..68c3eee132 100644 --- a/esphome/components/animation/__init__.py +++ b/esphome/components/animation/__init__.py @@ -76,8 +76,6 @@ async def to_code(config): pos = 0 for frameIndex in range(frames): image.seek(frameIndex) - if CONF_RESIZE in config: - image.thumbnail(config[CONF_RESIZE]) frame = image.convert("RGB") if CONF_RESIZE in config: frame = frame.resize([width, height]) From 358c59bd8d63dc94bb1aeb22d90ad7dddefd731c Mon Sep 17 00:00:00 2001 From: tracestep <16390082+tracestep@users.noreply.github.com> Date: Sun, 26 Mar 2023 18:59:57 -0300 Subject: [PATCH 4/5] SX1509 minimum loop period (fixes esphome/issues#4325) (#4613) * Minimum loop period (fixes esphome/issues#4325) * clang-tidy suggestions * More clang-tidy suggestions --- esphome/components/sx1509/sx1509.cpp | 3 +++ esphome/components/sx1509/sx1509.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/esphome/components/sx1509/sx1509.cpp b/esphome/components/sx1509/sx1509.cpp index 60cbae6aa6..d0a84b99ff 100644 --- a/esphome/components/sx1509/sx1509.cpp +++ b/esphome/components/sx1509/sx1509.cpp @@ -42,6 +42,9 @@ void SX1509Component::dump_config() { void SX1509Component::loop() { if (this->has_keypad_) { + if (millis() - this->last_loop_timestamp_ < min_loop_period_) + return; + this->last_loop_timestamp_ = millis(); uint16_t key_data = this->read_key_data(); for (auto *binary_sensor : this->keypad_binary_sensors_) binary_sensor->process(key_data); diff --git a/esphome/components/sx1509/sx1509.h b/esphome/components/sx1509/sx1509.h index 50230b1086..8e3b41e233 100644 --- a/esphome/components/sx1509/sx1509.h +++ b/esphome/components/sx1509/sx1509.h @@ -69,6 +69,9 @@ class SX1509Component : public Component, public i2c::I2CDevice { uint8_t debounce_time_ = 1; std::vector keypad_binary_sensors_; + uint32_t last_loop_timestamp_ = 0; + const uint32_t min_loop_period_ = 15; // ms + void setup_keypad_(); void set_debounce_config_(uint8_t config_value); void set_debounce_time_(uint8_t time); From f862b479e71e4cd0766960cf1adbd69567dd8b69 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Mon, 27 Mar 2023 15:58:29 +1300 Subject: [PATCH 5/5] Bump version to 2023.3.2 --- esphome/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/const.py b/esphome/const.py index 35d1d3fa03..bca0973bb9 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -1,6 +1,6 @@ """Constants used by esphome.""" -__version__ = "2023.3.1" +__version__ = "2023.3.2" ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_"