1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-25 13:13:48 +01:00

climate triggers Climate and ClimateCall references (#5028)

This commit is contained in:
Sergey Dudanov
2023-07-30 23:52:01 +04:00
committed by GitHub
parent cd72a2ed7e
commit a120a455bf
7 changed files with 33 additions and 20 deletions

View File

@@ -198,7 +198,7 @@ class Climate : public EntityBase {
*
* @param callback The callback to call.
*/
void add_on_state_callback(std::function<void()> &&callback);
void add_on_state_callback(std::function<void(Climate &)> &&callback);
/**
* Add a callback for the climate device configuration; each time the configuration parameters of a climate device
@@ -206,7 +206,7 @@ class Climate : public EntityBase {
*
* @param callback The callback to call.
*/
void add_on_control_callback(std::function<void()> &&callback);
void add_on_control_callback(std::function<void(ClimateCall &)> &&callback);
/** Make a climate device control call, this is used to control the climate device, see the ClimateCall description
* for more info.
@@ -273,8 +273,8 @@ class Climate : public EntityBase {
void dump_traits_(const char *tag);
CallbackManager<void()> state_callback_{};
CallbackManager<void()> control_callback_{};
CallbackManager<void(Climate &)> state_callback_{};
CallbackManager<void(ClimateCall &)> control_callback_{};
ESPPreferenceObject rtc_;
optional<float> visual_min_temperature_override_{};
optional<float> visual_max_temperature_override_{};