mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add new climate feature flags to econet (#109541)
Adds new climate feature flags to econet
This commit is contained in:
parent
7730efdaa2
commit
f154b7f2d9
@ -66,6 +66,7 @@ class EcoNetThermostat(EcoNetEntity, ClimateEntity):
|
|||||||
|
|
||||||
_attr_should_poll = True
|
_attr_should_poll = True
|
||||||
_attr_temperature_unit = UnitOfTemperature.FAHRENHEIT
|
_attr_temperature_unit = UnitOfTemperature.FAHRENHEIT
|
||||||
|
_enable_turn_on_off_backwards_compatibility = False
|
||||||
|
|
||||||
def __init__(self, thermostat):
|
def __init__(self, thermostat):
|
||||||
"""Initialize."""
|
"""Initialize."""
|
||||||
@ -79,12 +80,13 @@ class EcoNetThermostat(EcoNetEntity, ClimateEntity):
|
|||||||
ha_mode = ECONET_STATE_TO_HA[mode]
|
ha_mode = ECONET_STATE_TO_HA[mode]
|
||||||
self._attr_hvac_modes.append(ha_mode)
|
self._attr_hvac_modes.append(ha_mode)
|
||||||
|
|
||||||
@property
|
self._attr_supported_features |= SUPPORT_FLAGS_THERMOSTAT
|
||||||
def supported_features(self) -> ClimateEntityFeature:
|
if thermostat.supports_humidifier:
|
||||||
"""Return the list of supported features."""
|
self._attr_supported_features |= ClimateEntityFeature.TARGET_HUMIDITY
|
||||||
if self._econet.supports_humidifier:
|
if len(self.hvac_modes) > 1 and HVACMode.OFF in self.hvac_modes:
|
||||||
return SUPPORT_FLAGS_THERMOSTAT | ClimateEntityFeature.TARGET_HUMIDITY
|
self._attr_supported_features |= (
|
||||||
return SUPPORT_FLAGS_THERMOSTAT
|
ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def current_temperature(self):
|
def current_temperature(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user