diff --git a/custom_components/smart_thermostat/climate.py b/custom_components/smart_thermostat/climate.py index d1ca55b..30b1ebf 100644 --- a/custom_components/smart_thermostat/climate.py +++ b/custom_components/smart_thermostat/climate.py @@ -285,6 +285,9 @@ def __init__(self, **kwargs): self._target_temp = kwargs.get('target_temp') self._unit = kwargs.get('unit') self._support_flags = ClimateEntityFeature.TARGET_TEMPERATURE + self._support_flags |= ClimateEntityFeature.TURN_OFF + self._support_flags |= ClimateEntityFeature.TURN_ON + self._enable_turn_on_off_backwards_compatibility = False # To be removed after deprecation period self._attr_preset_mode = 'none' self._away_temp = kwargs.get('away_temp') self._eco_temp = kwargs.get('eco_temp') @@ -301,8 +304,7 @@ def __init__(self, **kwargs): self._home_temp, self._sleep_temp, self._activity_temp]]: - self._support_flags = ClimateEntityFeature.TARGET_TEMPERATURE | \ - ClimateEntityFeature.PRESET_MODE + self._support_flags |= ClimateEntityFeature.PRESET_MODE self._difference = kwargs.get('difference') if self._ac_mode: self._attr_hvac_modes = [HVACMode.COOL, HVACMode.HEAT, HVACMode.OFF] @@ -975,7 +977,7 @@ def _is_device_active(self): return float(self.hass.states.get(self.heater_or_cooler_entity).state) > 0 except: return False - + @property def supported_features(self): """Return the list of supported features."""