Use _attr_supported_features in tado climate (#82219)
parent
ba546e1072
commit
c62c19e58b
|
@ -245,7 +245,7 @@ class TadoClimate(TadoZoneEntity, ClimateEntity):
|
||||||
self._ac_device = zone_type == TYPE_AIR_CONDITIONING
|
self._ac_device = zone_type == TYPE_AIR_CONDITIONING
|
||||||
self._supported_hvac_modes = supported_hvac_modes
|
self._supported_hvac_modes = supported_hvac_modes
|
||||||
self._supported_fan_modes = supported_fan_modes
|
self._supported_fan_modes = supported_fan_modes
|
||||||
self._support_flags = support_flags
|
self._attr_supported_features = support_flags
|
||||||
|
|
||||||
self._available = False
|
self._available = False
|
||||||
|
|
||||||
|
@ -286,11 +286,6 @@ class TadoClimate(TadoZoneEntity, ClimateEntity):
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
|
||||||
def supported_features(self):
|
|
||||||
"""Return the list of supported features."""
|
|
||||||
return self._support_flags
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
"""Return the name of the entity."""
|
"""Return the name of the entity."""
|
||||||
|
@ -466,7 +461,7 @@ class TadoClimate(TadoZoneEntity, ClimateEntity):
|
||||||
@property
|
@property
|
||||||
def swing_modes(self):
|
def swing_modes(self):
|
||||||
"""Swing modes for the device."""
|
"""Swing modes for the device."""
|
||||||
if self._support_flags & ClimateEntityFeature.SWING_MODE:
|
if self.supported_features & ClimateEntityFeature.SWING_MODE:
|
||||||
return [TADO_SWING_ON, TADO_SWING_OFF]
|
return [TADO_SWING_ON, TADO_SWING_OFF]
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -618,10 +613,10 @@ class TadoClimate(TadoZoneEntity, ClimateEntity):
|
||||||
temperature_to_send = None
|
temperature_to_send = None
|
||||||
|
|
||||||
fan_speed = None
|
fan_speed = None
|
||||||
if self._support_flags & ClimateEntityFeature.FAN_MODE:
|
if self.supported_features & ClimateEntityFeature.FAN_MODE:
|
||||||
fan_speed = self._current_tado_fan_speed
|
fan_speed = self._current_tado_fan_speed
|
||||||
swing = None
|
swing = None
|
||||||
if self._support_flags & ClimateEntityFeature.SWING_MODE:
|
if self.supported_features & ClimateEntityFeature.SWING_MODE:
|
||||||
swing = self._current_tado_swing_mode
|
swing = self._current_tado_swing_mode
|
||||||
|
|
||||||
self._tado.set_zone_overlay(
|
self._tado.set_zone_overlay(
|
||||||
|
|
Loading…
Reference in New Issue