Skip to content

Commit

Permalink
Update fanSpeed checks to the new fanLevel property in zone.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
JorgenVatle committed Jul 3, 2022
1 parent 697a65b commit 56befbf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions PyTado/zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def __init__(self, data, zone_id):
self._current_humidity_timestamp = None
self._is_away = False
self._current_hvac_action = None
# Todo: Determine if it would be best to refactor to _current_fan_level
self._current_fan_speed = None
self._current_hvac_mode = None
self._current_swing_mode = None
Expand Down Expand Up @@ -306,9 +307,9 @@ def update_data(self, data):
self._current_hvac_mode = TADO_HVAC_ACTION_TO_MODES[setting["type"]]

# Not all devices have fans
if "fanSpeed" in setting:
if "fanLevel" in setting:
self._current_fan_speed = setting.get(
"fanSpeed", CONST_FAN_AUTO if self._power == "ON" else CONST_FAN_OFF
"fanLevel", CONST_FAN_AUTO if self._power == "ON" else CONST_FAN_OFF
)
elif "type" in setting and setting["type"] == TYPE_AIR_CONDITIONING:
self._current_fan_speed = (
Expand Down

0 comments on commit 56befbf

Please sign in to comment.