From 2950c402d7eb27f1481727304c669638c938fa78 Mon Sep 17 00:00:00 2001 From: G Johansson Date: Sun, 4 Feb 2024 09:02:52 -0500 Subject: [PATCH] Fix new climate feature flags in intesishome (#109563) --- homeassistant/components/intesishome/climate.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/intesishome/climate.py b/homeassistant/components/intesishome/climate.py index 285be2c9cea..64f52fae0a6 100644 --- a/homeassistant/components/intesishome/climate.py +++ b/homeassistant/components/intesishome/climate.py @@ -146,6 +146,7 @@ class IntesisAC(ClimateEntity): _attr_should_poll = False _attr_temperature_unit = UnitOfTemperature.CELSIUS + _enable_turn_on_off_backwards_compatibility = False def __init__(self, ih_device_id, ih_device, controller): """Initialize the thermostat.""" @@ -175,10 +176,6 @@ class IntesisAC(ClimateEntity): self._power_consumption_heat = None self._power_consumption_cool = None - self._attr_supported_features |= ( - ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON - ) - # Setpoint support if controller.has_setpoint_control(ih_device_id): self._attr_supported_features |= ClimateEntityFeature.TARGET_TEMPERATURE @@ -208,6 +205,11 @@ class IntesisAC(ClimateEntity): self._attr_hvac_modes.extend(mode_list) self._attr_hvac_modes.append(HVACMode.OFF) + if len(self.hvac_modes) > 1: + self._attr_supported_features |= ( + ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON + ) + async def async_added_to_hass(self) -> None: """Subscribe to event updates.""" _LOGGER.debug("Added climate device with state: %s", repr(self._ih_device))