Skip to content

Commit

Permalink
Merge pull request #221 from plugwise/anna_v438
Browse files Browse the repository at this point in the history
  • Loading branch information
bouwew authored Oct 8, 2022
2 parents 07bd31b + 77765de commit c3d157b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

# v0.24.1: Bugfix: fix root-cause of https://github.com/home-assistant/core/issues/79708

# v0.24.0: Improve support for Anna-Loria combination
- Replace mode heat_cool by cool (available modes are: auto, heat, cool)
- Add cooling_enabled switch
Expand Down
2 changes: 1 addition & 1 deletion plugwise/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Plugwise module."""

__version__ = "0.24.0"
__version__ = "0.24.1"

from plugwise.smile import Smile
from plugwise.stick import Stick
26 changes: 12 additions & 14 deletions plugwise/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,20 +962,18 @@ def _get_appliance_data(self, d_id: str) -> DeviceData:
data["cooling_enabled"] = self._cooling_enabled
if self.smile_name == "Smile Anna":
# Use elga_status_code or cooling_enabled to set _cooling_enabled to True
if not self._cooling_present:
pass

# Elga:
if "elga_status_code" in data:
self._cooling_enabled = data["elga_status_code"] in [8, 9]
data["cooling_enabled"] = self._cooling_enabled
self._cooling_active = data["elga_status_code"] == 8
data.pop("elga_status_code", None)
# Loria/Thermastate: look at cooling_state, not at cooling_enabled, not available on R32!
elif "cooling_ena_switch" in data:
self._cooling_enabled = data["cooling_ena_switch"]
data["cooling_enabled"] = self._cooling_enabled
self._cooling_active = data["cooling_state"]
if self._cooling_present:
# Elga:
if "elga_status_code" in data:
self._cooling_enabled = data["elga_status_code"] in [8, 9]
data["cooling_enabled"] = self._cooling_enabled
self._cooling_active = data["elga_status_code"] == 8
data.pop("elga_status_code", None)
# Loria/Thermastate: look at cooling_state, not at cooling_enabled, not available on R32!
elif "cooling_ena_switch" in data:
self._cooling_enabled = data["cooling_ena_switch"]
data["cooling_enabled"] = self._cooling_enabled
self._cooling_active = data["cooling_state"]

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

0 comments on commit c3d157b

Please sign in to comment.