Skip to content

Commit

Permalink
fix: add turn_on/turn_iff features to climate entity
Browse files Browse the repository at this point in the history
  • Loading branch information
alryaz authored Apr 10, 2024
1 parent f98e494 commit af50998
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions custom_components/turkov/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ def _update_attr_supported_features(self) -> None:
device = self.coordinator.turkov_device

supported_features = ClimateEntityFeature.FAN_MODE
for feature_name in ("TURN_ON", "TURN_OFF"):
# @todo: check against latest HA support
if hasattr(ClimateEntityFeature, feature_name):
supported_features |= getattr(
ClimateEntityFeature, feature_name
)
if getattr(self, "_attr_supported_features", None):
supported_features |= self._attr_supported_features
if device.target_temperature is not None:
Expand Down

0 comments on commit af50998

Please sign in to comment.