mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 21:25:13 +02:00
Fix incorrectly assigning supported features for plugwise climates (#109749)
This commit is contained in:
@@ -63,11 +63,6 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
|
|||||||
self.gateway_data = coordinator.data.devices[gateway_id]
|
self.gateway_data = coordinator.data.devices[gateway_id]
|
||||||
# Determine supported features
|
# Determine supported features
|
||||||
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
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 (
|
if (
|
||||||
self.cdr_gateway["cooling_present"]
|
self.cdr_gateway["cooling_present"]
|
||||||
and self.cdr_gateway["smile_name"] != "Adam"
|
and self.cdr_gateway["smile_name"] != "Adam"
|
||||||
@@ -75,6 +70,10 @@ class PlugwiseClimateEntity(PlugwiseEntity, ClimateEntity):
|
|||||||
self._attr_supported_features = (
|
self._attr_supported_features = (
|
||||||
ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
|
||||||
)
|
)
|
||||||
|
if HVACMode.OFF in self.hvac_modes:
|
||||||
|
self._attr_supported_features |= (
|
||||||
|
ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
|
||||||
|
)
|
||||||
if presets := self.device.get("preset_modes"):
|
if presets := self.device.get("preset_modes"):
|
||||||
self._attr_supported_features |= ClimateEntityFeature.PRESET_MODE
|
self._attr_supported_features |= ClimateEntityFeature.PRESET_MODE
|
||||||
self._attr_preset_modes = presets
|
self._attr_preset_modes = presets
|
||||||
|
Reference in New Issue
Block a user