Skip to content

Commit c3d157b

Browse files
authored
Merge pull request #221 from plugwise/anna_v438
Fix for home-assistant/core#79708
2 parents 07bd31b + 77765de commit c3d157b

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Changelog
22

3+
# v0.24.1: Bugfix: fix root-cause of https://github.com/home-assistant/core/issues/79708
4+
35
# v0.24.0: Improve support for Anna-Loria combination
46
- Replace mode heat_cool by cool (available modes are: auto, heat, cool)
57
- Add cooling_enabled switch

plugwise/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Plugwise module."""
22

3-
__version__ = "0.24.0"
3+
__version__ = "0.24.1"
44

55
from plugwise.smile import Smile
66
from plugwise.stick import Stick

plugwise/helper.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -962,20 +962,18 @@ def _get_appliance_data(self, d_id: str) -> DeviceData:
962962
data["cooling_enabled"] = self._cooling_enabled
963963
if self.smile_name == "Smile Anna":
964964
# Use elga_status_code or cooling_enabled to set _cooling_enabled to True
965-
if not self._cooling_present:
966-
pass
967-
968-
# Elga:
969-
if "elga_status_code" in data:
970-
self._cooling_enabled = data["elga_status_code"] in [8, 9]
971-
data["cooling_enabled"] = self._cooling_enabled
972-
self._cooling_active = data["elga_status_code"] == 8
973-
data.pop("elga_status_code", None)
974-
# Loria/Thermastate: look at cooling_state, not at cooling_enabled, not available on R32!
975-
elif "cooling_ena_switch" in data:
976-
self._cooling_enabled = data["cooling_ena_switch"]
977-
data["cooling_enabled"] = self._cooling_enabled
978-
self._cooling_active = data["cooling_state"]
965+
if self._cooling_present:
966+
# Elga:
967+
if "elga_status_code" in data:
968+
self._cooling_enabled = data["elga_status_code"] in [8, 9]
969+
data["cooling_enabled"] = self._cooling_enabled
970+
self._cooling_active = data["elga_status_code"] == 8
971+
data.pop("elga_status_code", None)
972+
# Loria/Thermastate: look at cooling_state, not at cooling_enabled, not available on R32!
973+
elif "cooling_ena_switch" in data:
974+
self._cooling_enabled = data["cooling_ena_switch"]
975+
data["cooling_enabled"] = self._cooling_enabled
976+
self._cooling_active = data["cooling_state"]
979977

980978
# Don't show cooling_state when no cooling present
981979
if not self._cooling_present and "cooling_state" in data:

0 commit comments

Comments
 (0)