Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Detect that we have a swing mode
Browse files Browse the repository at this point in the history
    * custom_components/daikin_residential_altherma/climate.py:
  • Loading branch information
jwillemsen committed Dec 13, 2023
1 parent 2b15847 commit a30edc5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions custom_components/daikin_residential_altherma/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,14 @@ def supported_features(self):
supported_features = SUPPORT_TARGET_TEMPERATURE
if len(self.preset_modes) > 1:
supported_features |= SUPPORT_PRESET_MODE
if cc.get("fanControl") is not None:
supported_features |= SUPPORT_FAN_MODE
fanControl = cc.get("fanControl")
if fanControl is not None:
operationmode = cc["operationMode"]["value"]
if fanControl["value"]["operationModes"][operationmode]["fanSpeed"] is not None:
supported_features |= SUPPORT_FAN_MODE
if fanControl["value"]["operationModes"][operationmode]["fanDirection"] is not None:
supported_features |= SUPPORT_SWING_MODE
_LOGGER.info("Support features %s", supported_features)
# todo add support for swing mode
return supported_features

@property
Expand Down

0 comments on commit a30edc5

Please sign in to comment.