Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for https://github.com/home-assistant/core/issues/79708 #221

Merged
merged 3 commits into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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