Skip to content

Commit 9e99eff

Browse files
committed
Fix
1 parent 84b7b3b commit 9e99eff

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plugwise/data.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,10 @@ def _get_location_data(self, loc_id: str) -> GwEntityData:
160160
"""
161161
zone = self._zones[loc_id]
162162
data = self._get_zone_data(loc_id)
163-
if ctrl_state := self._control_state(loc_id) and str(control_state) in ("cooling", "heating", "preheating"):
164-
data["control_state"] = str(ctrl_state)
165-
self._count += 1
163+
if ctrl_state := self._control_state(loc_id):
164+
if str(ctrl_state) in ("cooling", "heating", "preheating"):
165+
data["control_state"] = str(ctrl_state)
166+
self._count += 1
166167
else:
167168
data["control_state"] = "idle"
168169
self._count += 1

0 commit comments

Comments
 (0)