Add new climate feature flags for plugwise (#109464)

This commit is contained in:
G Johansson 2024-02-04 05:37:52 -05:00 committed by GitHub
parent 7d9935d24b
commit 89d77ee8ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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"