mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +01:00
[bang-bang] Remove `assert()
` (#7533)
This commit is contained in:
parent
e31a96bfe2
commit
949e61db8d
1 changed files with 5 additions and 2 deletions
|
@ -157,8 +157,11 @@ void BangBangClimate::switch_to_action_(climate::ClimateAction action) {
|
||||||
default:
|
default:
|
||||||
trig = nullptr;
|
trig = nullptr;
|
||||||
}
|
}
|
||||||
assert(trig != nullptr);
|
if (trig != nullptr) {
|
||||||
trig->trigger();
|
trig->trigger();
|
||||||
|
} else {
|
||||||
|
ESP_LOGW(TAG, "trig not set - unsupported action");
|
||||||
|
}
|
||||||
this->action = action;
|
this->action = action;
|
||||||
this->prev_trigger_ = trig;
|
this->prev_trigger_ = trig;
|
||||||
this->publish_state();
|
this->publish_state();
|
||||||
|
|
Loading…
Reference in a new issue