Add new climate feature flags to evohome (#109429)

This commit is contained in:
G Johansson 2024-02-03 06:13:20 -05:00 committed by GitHub
parent 96feec9cbf
commit 6c8636ae7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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.