minimize changes

This commit is contained in:
J. Nick Koston
2025-10-21 22:34:58 -10:00
parent 55d1b823e8
commit d8e8c2832e

View File

@@ -405,7 +405,7 @@ void ToshibaClimate::setup() {
this->swing_modes_ = this->toshiba_swing_modes_();
// Ensure swing mode is always initialized to a valid value
if (this->swing_modes_.empty() || !this->swing_modes_.contains(this->swing_mode)) {
if (this->swing_modes_.empty() || (this->swing_modes_.count(this->swing_mode) == 0)) {
// No swing support for this model or current swing mode not supported, reset to OFF
this->swing_mode = climate::CLIMATE_SWING_OFF;
}