Skip to content

Commit b572b04

Browse files
committed
Revert back to using elga_status codes as means to determine cooling-on
1 parent 74d47b8 commit b572b04

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

plugwise/helper.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,17 +1028,13 @@ def _get_measurement_data(self, dev_id: str) -> DeviceData:
10281028
if self._is_thermostat and self.smile(ANNA) and dev_id == self._heater_id:
10291029
# Anna+Elga: base cooling_state on the elga-status-code
10301030
if "elga_status_code" in data:
1031-
# Determine _cooling_present and _cooling_enabled
1032-
if "cooling_enabled" in data["binary_sensors"]:
1033-
self._cooling_present = True
1034-
data["model"] = "Generic heater/cooler"
1035-
self._cooling_enabled = False
1036-
if data["binary_sensors"]["cooling_enabled"]:
1037-
self._cooling_enabled = True
1038-
1039-
data["binary_sensors"]["cooling_state"] = self._cooling_active = (
1040-
data["elga_status_code"] == 8
1041-
)
1031+
#Techneco Elga has cooling-capability
1032+
self._cooling_present = True
1033+
data["model"] = "Generic heater/cooler"
1034+
self._cooling_enabled = data["elga_status_code"] in [8, 9]
1035+
data["binary_sensors"]["cooling_state"] = self._cooling_active = (
1036+
data["elga_status_code"] == 8
1037+
)
10421038
data.pop("elga_status_code", None)
10431039
self._count -= 1
10441040
# Elga has no cooling-switch

0 commit comments

Comments
 (0)