Fix new climate feature flags in intesishome (#109563)

This commit is contained in:
G Johansson 2024-02-04 09:02:52 -05:00 committed by GitHub
parent ae70729932
commit 2950c402d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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))