diff --git a/components/tclac/tclac.cpp b/components/tclac/tclac.cpp index e741e0f..13d5542 100644 --- a/components/tclac/tclac.cpp +++ b/components/tclac/tclac.cpp @@ -626,7 +626,7 @@ void tclacClimate::set_vertical_swing_direction(VerticalSwingDirection direction void tclacClimate::set_supported_modes(const std::set &modes) { auto traits_ = climate::ClimateTraits(); this->traits_.set_supported_modes(modes); - this->traits_.add_supported_mode(climate::CLIMATE_MODE_OFF); // Выключенный режим доступен всегда + this->traits_.add_supported_mode(climate::CLIMATE_MODE_OFF); // Выключенный режим доступен всегда this->traits_.add_supported_mode(climate::CLIMATE_MODE_AUTO); // Автоматический режим тоже } @@ -635,13 +635,15 @@ void tclacClimate::set_horizontal_swing_direction(HorizontalSwingDirection direc } void tclacClimate::set_supported_fan_modes(const std::set &modes){ - this->traits.set_supported_fan_modes(modes); - this->traits.add_supported_fan_mode(climate::CLIMATE_FAN_AUTO); // Автоматический режим доступен всегда + auto traits_ = climate::ClimateTraits(); + this->traits_.set_supported_fan_modes(modes); + this->traits_.add_supported_fan_mode(climate::CLIMATE_FAN_AUTO); // Автоматический режим доступен всегда } void tclacClimate::set_supported_swing_modes(const std::set &modes) { - this->traits.set_supported_swing_modes(modes); - this->traits.add_supported_swing_mode(climate::CLIMATE_SWING_OFF); // Выключенный режим доступен всегда + auto traits_ = climate::ClimateTraits(); + this->traits_.set_supported_swing_modes(modes); + this->traits_.add_supported_swing_mode(climate::CLIMATE_SWING_OFF); // Выключенный режим доступен всегда }