mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix new climate feature flags in intesishome (#109563)
This commit is contained in:
parent
ae70729932
commit
2950c402d7
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user