mirror of
https://github.com/esphome/esphome.git
synced 2024-11-13 02:37:47 +01:00
Climate preset fix (#5407)
This commit is contained in:
parent
e55636ed52
commit
8f1ce8c7f7
1 changed files with 2 additions and 0 deletions
|
@ -986,6 +986,7 @@ void ThermostatClimate::change_preset_(climate::ClimatePreset preset) {
|
||||||
// Fire any preset changed trigger if defined
|
// Fire any preset changed trigger if defined
|
||||||
Trigger<> *trig = this->preset_change_trigger_;
|
Trigger<> *trig = this->preset_change_trigger_;
|
||||||
assert(trig != nullptr);
|
assert(trig != nullptr);
|
||||||
|
this->preset = preset;
|
||||||
trig->trigger();
|
trig->trigger();
|
||||||
|
|
||||||
this->refresh();
|
this->refresh();
|
||||||
|
@ -1010,6 +1011,7 @@ void ThermostatClimate::change_custom_preset_(const std::string &custom_preset)
|
||||||
// Fire any preset changed trigger if defined
|
// Fire any preset changed trigger if defined
|
||||||
Trigger<> *trig = this->preset_change_trigger_;
|
Trigger<> *trig = this->preset_change_trigger_;
|
||||||
assert(trig != nullptr);
|
assert(trig != nullptr);
|
||||||
|
this->custom_preset = custom_preset;
|
||||||
trig->trigger();
|
trig->trigger();
|
||||||
|
|
||||||
this->refresh();
|
this->refresh();
|
||||||
|
|
Loading…
Reference in a new issue