diff --git a/esphome/components/climate/__init__.py b/esphome/components/climate/__init__.py index 4a16c3fb7d..6734917bf3 100644 --- a/esphome/components/climate/__init__.py +++ b/esphome/components/climate/__init__.py @@ -324,6 +324,10 @@ async def setup_climate_core_(var, config): trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var) await automation.build_automation(trigger, [], conf) + for conf in config.get(CONF_ON_CONTROL, []): + trigger = cg.new_Pvariable(conf[CONF_TRIGGER_ID], var) + await automation.build_automation(trigger, [], conf) + async def register_climate(var, config): if not CORE.has_id(config[CONF_ID]): diff --git a/esphome/const.py b/esphome/const.py index f175524796..35d1d3fa03 100644 --- a/esphome/const.py +++ b/esphome/const.py @@ -1,6 +1,6 @@ """Constants used by esphome.""" -__version__ = "2023.3.0" +__version__ = "2023.3.1" ALLOWED_NAME_CHARS = "abcdefghijklmnopqrstuvwxyz0123456789-_" diff --git a/esphome/core/helpers.cpp b/esphome/core/helpers.cpp index 4ac9303b20..7f5c3ad333 100644 --- a/esphome/core/helpers.cpp +++ b/esphome/core/helpers.cpp @@ -393,13 +393,13 @@ void hsv_to_rgb(int hue, float saturation, float value, float &red, float &green } // System APIs -#if defined(USE_ESP8266) +#if defined(USE_ESP8266) || defined(USE_RP2040) // ESP8266 doesn't have mutexes, but that shouldn't be an issue as it's single-core and non-preemptive OS. Mutex::Mutex() {} void Mutex::lock() {} bool Mutex::try_lock() { return true; } void Mutex::unlock() {} -#elif defined(USE_ESP32) || defined(USE_RP2040) +#elif defined(USE_ESP32) Mutex::Mutex() { handle_ = xSemaphoreCreateMutex(); } void Mutex::lock() { xSemaphoreTake(this->handle_, portMAX_DELAY); } bool Mutex::try_lock() { return xSemaphoreTake(this->handle_, 0) == pdTRUE; } diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index 0d2a7e298a..a107b1b849 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -17,9 +17,6 @@ #if defined(USE_ESP32) #include #include -#elif defined(USE_RP2040) -#include -#include #endif #define HOT __attribute__((hot)) @@ -539,7 +536,7 @@ class Mutex { Mutex &operator=(const Mutex &) = delete; private: -#if defined(USE_ESP32) || defined(USE_RP2040) +#if defined(USE_ESP32) SemaphoreHandle_t handle_; #endif };