Skip to content

Commit 0432c6a

Browse files
committed
Change dhw_cm_switch to _dhw_allowed_modes/select_dhw_mode
1 parent d06304e commit 0432c6a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

plugwise/helper.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,13 @@ def _get_toggle_state(
482482
if xml.find("type").text == "heater_central":
483483
locator = f"./actuator_functionalities/toggle_functionality[type='{toggle}']/state"
484484
if (state := xml.find(locator)) is not None:
485-
data["switches"][name] = state.text == "on"
486-
self._count += 1
485+
match toggle:
486+
case "cooling_ena_switch":
487+
data["switches"][name] = state.text == "on"
488+
self._count += 1
489+
case "dhw_cm_switch":
490+
self._dhw_allowed_modes = ["comfort", "off"]
491+
self.select_dhw_mode = "comfort" if state.text == "on" else "off"
487492

488493
def _get_plugwise_notifications(self) -> None:
489494
"""Collect the Plugwise notifications."""

0 commit comments

Comments
 (0)