Fix evohome preset modes (#76606)
parent
66b742f110
commit
078a4974e1
|
@ -128,26 +128,17 @@ class EvoClimateEntity(EvoDevice, ClimateEntity):
|
||||||
|
|
||||||
_attr_temperature_unit = TEMP_CELSIUS
|
_attr_temperature_unit = TEMP_CELSIUS
|
||||||
|
|
||||||
def __init__(self, evo_broker, evo_device) -> None:
|
|
||||||
"""Initialize a Climate device."""
|
|
||||||
super().__init__(evo_broker, evo_device)
|
|
||||||
|
|
||||||
self._preset_modes = None
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hvac_modes(self) -> list[str]:
|
def hvac_modes(self) -> list[str]:
|
||||||
"""Return a list of available hvac operation modes."""
|
"""Return a list of available hvac operation modes."""
|
||||||
return list(HA_HVAC_TO_TCS)
|
return list(HA_HVAC_TO_TCS)
|
||||||
|
|
||||||
@property
|
|
||||||
def preset_modes(self) -> list[str] | None:
|
|
||||||
"""Return a list of available preset modes."""
|
|
||||||
return self._preset_modes
|
|
||||||
|
|
||||||
|
|
||||||
class EvoZone(EvoChild, EvoClimateEntity):
|
class EvoZone(EvoChild, EvoClimateEntity):
|
||||||
"""Base for a Honeywell TCC Zone."""
|
"""Base for a Honeywell TCC Zone."""
|
||||||
|
|
||||||
|
_attr_preset_modes = list(HA_PRESET_TO_EVO)
|
||||||
|
|
||||||
def __init__(self, evo_broker, evo_device) -> None:
|
def __init__(self, evo_broker, evo_device) -> None:
|
||||||
"""Initialize a Honeywell TCC Zone."""
|
"""Initialize a Honeywell TCC Zone."""
|
||||||
super().__init__(evo_broker, evo_device)
|
super().__init__(evo_broker, evo_device)
|
||||||
|
@ -233,7 +224,7 @@ class EvoZone(EvoChild, EvoClimateEntity):
|
||||||
"""
|
"""
|
||||||
return self._evo_device.setpointCapabilities["maxHeatSetpoint"]
|
return self._evo_device.setpointCapabilities["maxHeatSetpoint"]
|
||||||
|
|
||||||
async def async_set_temperature(self, **kwargs) -> None:
|
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||||
"""Set a new target temperature."""
|
"""Set a new target temperature."""
|
||||||
temperature = kwargs["temperature"]
|
temperature = kwargs["temperature"]
|
||||||
|
|
||||||
|
@ -249,7 +240,7 @@ class EvoZone(EvoChild, EvoClimateEntity):
|
||||||
self._evo_device.set_temperature(temperature, until=until)
|
self._evo_device.set_temperature(temperature, until=until)
|
||||||
)
|
)
|
||||||
|
|
||||||
async def async_set_hvac_mode(self, hvac_mode: str) -> None:
|
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
||||||
"""Set a Zone to one of its native EVO_* operating modes.
|
"""Set a Zone to one of its native EVO_* operating modes.
|
||||||
|
|
||||||
Zones inherit their _effective_ operating mode from their Controller.
|
Zones inherit their _effective_ operating mode from their Controller.
|
||||||
|
@ -387,7 +378,7 @@ class EvoController(EvoClimateEntity):
|
||||||
"""Return the current preset mode, e.g., home, away, temp."""
|
"""Return the current preset mode, e.g., home, away, temp."""
|
||||||
return TCS_PRESET_TO_HA.get(self._evo_tcs.systemModeStatus["mode"])
|
return TCS_PRESET_TO_HA.get(self._evo_tcs.systemModeStatus["mode"])
|
||||||
|
|
||||||
async def async_set_temperature(self, **kwargs) -> None:
|
async def async_set_temperature(self, **kwargs: Any) -> None:
|
||||||
"""Raise exception as Controllers don't have a target temperature."""
|
"""Raise exception as Controllers don't have a target temperature."""
|
||||||
raise NotImplementedError("Evohome Controllers don't have target temperatures.")
|
raise NotImplementedError("Evohome Controllers don't have target temperatures.")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue