Skip to content

Commit 3e8bee0

Browse files
committed
Anna+Elga: base heating_state on central_heating_state
1 parent 313cde6 commit 3e8bee0

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

plugwise/helper.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -968,6 +968,10 @@ def _process_c_heating_state(self, data: dict[str, Any]) -> None:
968968
else:
969969
data["heating_state"] = data["c_heating_state"]
970970

971+
if self._elga:
972+
# Anna + Elga: use central_heating_state to show heating_state
973+
data["heating_state"] = data["c_heating_state"]
974+
971975
def _get_appliance_data(self, d_id: str) -> DeviceData:
972976
"""Helper-function for smile.py: _get_device_data().
973977
@@ -1008,16 +1012,10 @@ def _get_appliance_data(self, d_id: str) -> DeviceData:
10081012

10091013
if d_id == self._heater_id and self.smile_name == "Smile Anna":
10101014
if "elga_status_code" in data:
1011-
# Base heating_/cooling_state on the elga-status-code
1012-
data["heating_state"] = False
1013-
data["cooling_state"] = False
1014-
if data["elga_status_code"] in [4, 10] or (
1015-
data["elga_status_code"] in [3, 5, 6, 11] and not data["dhw_state"]
1016-
):
1017-
data["heating_state"] = True
1018-
if data["elga_status_code"] == 8:
1019-
data["cooling_state"] = self._cooling_active = True
1020-
1015+
# Base cooling_state on the elga-status-code
1016+
data["cooling_state"] = self._cooling_active = (
1017+
data["elga_status_code"] == 8
1018+
)
10211019
data.pop("elga_status_code", None)
10221020

10231021
# Determine _cooling_present and _cooling_enabled

0 commit comments

Comments
 (0)