Skip to content

Commit 84b7b3b

Browse files
committed
Improve control_state processing
1 parent 14578c7 commit 84b7b3b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

plugwise/data.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ 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):
164-
data["control_state"] = ctrl_state
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
166+
else:
167+
data["control_state"] = "idle"
165168
self._count += 1
166169

167170
# Thermostat data (presets, temperatures etc)

0 commit comments

Comments
 (0)