Skip to content

Commit f5f189d

Browse files
committed
Output mode=cool for Adam
1 parent f93ea23 commit f5f189d

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

plugwise/__init__.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,15 @@ def _device_data_climate(
227227
device_data["mode"] = "heat"
228228
if self._cooling_present:
229229
device_data["mode"] = "heat_cool"
230+
230231
# Adam: add off-mode based on regulation_mode = off
231-
if (
232-
"select_regulation_mode" in self.gw_devices[self.gateway_id]
233-
and self.gw_devices[self.gateway_id]["select_regulation_mode"] == "off"
234-
):
235-
device_data["mode"] = "off"
232+
# or cool-mode for regulation_mode = cooling
233+
gateway = self.gw_devices[self.gateway_id]
234+
if "regulation_modes" in gateway:
235+
if gateway["select_regulation_mode"] == "off":
236+
device_data["mode"] = "off"
237+
if gateway["select_regulation_mode"] == "cooling":
238+
device_data["mode"] = "cool"
236239

237240
if "None" not in avail_schedules:
238241
loc_schedule_states = {}

0 commit comments

Comments
 (0)