Add new climate feature flags to radiotherm (#109466)

pull/109489/head
G Johansson 2024-02-03 03:50:24 +01:00 committed by GitHub
parent fbb7c9003f
commit 1fba47fc8e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -106,6 +106,7 @@ class RadioThermostat(RadioThermostatEntity, ClimateEntity):
_attr_temperature_unit = UnitOfTemperature.FAHRENHEIT
_attr_precision = PRECISION_HALVES
_attr_name = None
_enable_turn_on_off_backwards_compatibility = False
def __init__(self, coordinator: RadioThermUpdateCoordinator) -> None:
"""Initialize the thermostat."""
@ -113,7 +114,10 @@ class RadioThermostat(RadioThermostatEntity, ClimateEntity):
self._attr_unique_id = self.init_data.mac
self._attr_fan_modes = CT30_FAN_OPERATION_LIST
self._attr_supported_features = (
ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.FAN_MODE
ClimateEntityFeature.TARGET_TEMPERATURE
| ClimateEntityFeature.FAN_MODE
| ClimateEntityFeature.TURN_OFF
| ClimateEntityFeature.TURN_ON
)
if not isinstance(self.device, radiotherm.thermostat.CT80):
return