Add ClimateEntityFeatures to Nest (#109417)

This commit is contained in:
G Johansson 2024-02-03 06:11:19 -05:00 committed by GitHub
parent 5b9a3d5bd5
commit 8bec20ffa7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -100,6 +100,7 @@ class ThermostatEntity(ClimateEntity):
_attr_has_entity_name = True
_attr_should_poll = False
_attr_name = None
_enable_turn_on_off_backwards_compatibility = False
def __init__(self, device: Device) -> None:
"""Initialize ThermostatEntity."""
@ -246,7 +247,7 @@ class ThermostatEntity(ClimateEntity):
def _get_supported_features(self) -> ClimateEntityFeature:
"""Compute the bitmap of supported features from the current state."""
features = ClimateEntityFeature(0)
features = ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
if HVACMode.HEAT_COOL in self.hvac_modes:
features |= ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
if HVACMode.HEAT in self.hvac_modes or HVACMode.COOL in self.hvac_modes: