Add new climate feature flags to evohome (#109429)

pull/109883/head
G Johansson 2024-02-03 06:13:20 -05:00 committed by Franck Nijhof
parent f1b041afbe
commit c571f36c6c
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
1 changed files with 8 additions and 1 deletions

View File

@ -156,6 +156,7 @@ class EvoClimateEntity(EvoDevice, ClimateEntity):
"""Base for an evohome Climate device."""
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_enable_turn_on_off_backwards_compatibility = False
@property
def hvac_modes(self) -> list[HVACMode]:
@ -190,7 +191,10 @@ class EvoZone(EvoChild, EvoClimateEntity):
]
self._attr_supported_features = (
ClimateEntityFeature.PRESET_MODE | ClimateEntityFeature.TARGET_TEMPERATURE
ClimateEntityFeature.PRESET_MODE
| ClimateEntityFeature.TARGET_TEMPERATURE
| ClimateEntityFeature.TURN_OFF
| ClimateEntityFeature.TURN_ON
)
async def async_zone_svc_request(self, service: str, data: dict[str, Any]) -> None:
@ -372,6 +376,9 @@ class EvoController(EvoClimateEntity):
]
if self._attr_preset_modes:
self._attr_supported_features = ClimateEntityFeature.PRESET_MODE
self._attr_supported_features |= (
ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
)
async def async_tcs_svc_request(self, service: str, data: dict[str, Any]) -> None:
"""Process a service request (system mode) for a controller.