Skip to content

Commit

Permalink
Rename _supported_flags to _supported_features
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Apr 7, 2024
1 parent e1ed6b6 commit a270e0b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions zha/application/platforms/climate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(
super().__init__(unique_id, cluster_handlers, endpoint, device, **kwargs)
self._preset = Preset.NONE
self._presets = []
self._supported_flags = (
self._supported_features = (
ClimateEntityFeature.TARGET_TEMPERATURE
| ClimateEntityFeature.TURN_OFF
| ClimateEntityFeature.TURN_ON
Expand Down Expand Up @@ -288,10 +288,10 @@ def preset_modes(self) -> list[str] | None:
def supported_features(self) -> ClimateEntityFeature:
"""Return the list of supported features."""
if HVACMode.HEAT_COOL in self.hvac_modes:
self._supported_flags |= ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
self._supported_features |= ClimateEntityFeature.TARGET_TEMPERATURE_RANGE
if self._fan_cluster_handler is not None:
self._supported_flags |= ClimateEntityFeature.FAN_MODE
return self._supported_flags
self._supported_features |= ClimateEntityFeature.FAN_MODE
return self._supported_features

@property
def target_temperature(self):
Expand Down Expand Up @@ -508,7 +508,7 @@ def __init__(
"""Initialize ZHA Thermostat instance."""
super().__init__(unique_id, cluster_handlers, endpoint, device, **kwargs)
self._presets = [Preset.AWAY, Preset.NONE]
self._supported_flags |= ClimateEntityFeature.PRESET_MODE
self._supported_features |= ClimateEntityFeature.PRESET_MODE
self._manufacturer_ch = self.cluster_handlers["sinope_manufacturer_specific"]

self._tracked_tasks.append(
Expand Down Expand Up @@ -631,7 +631,7 @@ def __init__(
Preset.BOOST,
Preset.COMPLEX,
]
self._supported_flags |= ClimateEntityFeature.PRESET_MODE
self._supported_features |= ClimateEntityFeature.PRESET_MODE

@functools.cached_property
def hvac_modes(self) -> list[HVACMode]:
Expand Down Expand Up @@ -719,7 +719,7 @@ def __init__(
Preset.BOOST,
Preset.TEMP_MANUAL,
]
self._supported_flags |= ClimateEntityFeature.PRESET_MODE
self._supported_features |= ClimateEntityFeature.PRESET_MODE

@functools.cached_property
def hvac_modes(self) -> list[HVACMode]:
Expand Down Expand Up @@ -828,7 +828,7 @@ def __init__(
Preset.SCHEDULE,
self.PRESET_FROST,
]
self._supported_flags |= ClimateEntityFeature.PRESET_MODE
self._supported_features |= ClimateEntityFeature.PRESET_MODE

def handle_cluster_handler_attribute_updated(
self, event: ClusterAttributeUpdatedEvent
Expand Down

0 comments on commit a270e0b

Please sign in to comment.