mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 06:04:01 +00:00
fix compile
This commit is contained in:
@@ -405,7 +405,7 @@ void ToshibaClimate::setup() {
|
|||||||
this->swing_modes_ = this->toshiba_swing_modes_();
|
this->swing_modes_ = this->toshiba_swing_modes_();
|
||||||
|
|
||||||
// Ensure swing mode is always initialized to a valid value
|
// Ensure swing mode is always initialized to a valid value
|
||||||
if (this->swing_modes_.empty() || this->swing_modes_.find(this->swing_mode) == this->swing_modes_.end()) {
|
if (this->swing_modes_.empty() || !this->swing_modes_.contains(this->swing_mode)) {
|
||||||
// No swing support for this model or current swing mode not supported, reset to OFF
|
// No swing support for this model or current swing mode not supported, reset to OFF
|
||||||
this->swing_mode = climate::CLIMATE_SWING_OFF;
|
this->swing_mode = climate::CLIMATE_SWING_OFF;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user