mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Add ClimateEntityFeatures to Nest (#109417)
This commit is contained in:
parent
5b9a3d5bd5
commit
8bec20ffa7
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user