Add new climate feature flags for plugwise (#109464)

pull/109883/head
G Johansson 2024-02-04 05:37:52 -05:00 committed by Franck Nijhof
parent e7203d6015
commit 855edba3a2
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
1 changed files with 6 additions and 0 deletions

View File

@ -45,6 +45,7 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
_attr_name = None
_attr_temperature_unit = UnitOfTemperature.CELSIUS
_attr_translation_key = DOMAIN
_enable_turn_on_off_backwards_compatibility = False
_previous_mode: str = "heating"
@ -62,6 +63,11 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
self.gateway_data = coordinator.data.devices[gateway_id]
# Determine supported features
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
if HVACMode.OFF in self.hvac_modes:
self._attr_supported_features |= (
ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
)
if (
self.cdr_gateway["cooling_present"]
and self.cdr_gateway["smile_name"] != "Adam"