mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Add new climate feature flags to generic_thermostat (#109548)
Adds new climate feature flags to generic_thermostat
This commit is contained in:
parent
6b6d0606ac
commit
b655507738
@ -178,6 +178,7 @@ class GenericThermostat(ClimateEntity, RestoreEntity):
|
||||
"""Representation of a Generic Thermostat device."""
|
||||
|
||||
_attr_should_poll = False
|
||||
_enable_turn_on_off_backwards_compatibility = False
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@ -225,7 +226,11 @@ class GenericThermostat(ClimateEntity, RestoreEntity):
|
||||
self._target_temp = target_temp
|
||||
self._attr_temperature_unit = unit
|
||||
self._attr_unique_id = unique_id
|
||||
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
self._attr_supported_features = (
|
||||
ClimateEntityFeature.TARGET_TEMPERATURE
|
||||
| ClimateEntityFeature.TURN_OFF
|
||||
| ClimateEntityFeature.TURN_ON
|
||||
)
|
||||
if len(presets):
|
||||
self._attr_supported_features |= ClimateEntityFeature.PRESET_MODE
|
||||
self._attr_preset_modes = [PRESET_NONE] + list(presets.keys())
|
||||
|
Loading…
x
Reference in New Issue
Block a user