Skip to content

Commit 6273ca9

Browse files
authored
Merge pull request #225 from plugwise/core_heat_cool
Better Core compatibility
2 parents 038eee0 + df3396a commit 6273ca9

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
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.2: Better Core compatibility (change mode cool to heat_cool)
4+
35
# v0.24.1: Bugfix: fix root-cause of https://github.com/home-assistant/core/issues/79708
46

57
# v0.24.0: Improve support for Anna-Loria combination

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.1"
3+
__version__ = "0.24.2"
44

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

plugwise/smile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ def _device_data_climate(
198198
if ctrl_state := self._control_state(loc_id):
199199
device_data["control_state"] = ctrl_state
200200

201-
# Operation mode: auto, heat, cool
201+
# Operation modes: auto, heat, heat_cool
202202
device_data["mode"] = "auto"
203203
if sel_schedule == "None":
204204
device_data["mode"] = "heat"
205-
if self._cooling_enabled:
206-
device_data["mode"] = "cool"
205+
if self._cooling_present:
206+
device_data["mode"] = "heat_cool"
207207

208208
if "None" not in avail_schedules:
209209
loc_schedule_states = {}

tests/test_smile.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2780,7 +2780,7 @@ async def test_adam_heatpump_cooling(self):
27802780
"selected_schedule": "None",
27812781
"last_used": "Werkdag schema",
27822782
"control_state": "off",
2783-
"mode": "cool",
2783+
"mode": "heat_cool",
27842784
"sensors": {
27852785
"temperature": 18.8,
27862786
"battery": 55,
@@ -3428,7 +3428,7 @@ async def test_connect_anna_heatpump_cooling(self):
34283428
"available_schedules": ["standaard"],
34293429
"selected_schedule": "None",
34303430
"last_used": "standaard",
3431-
"mode": "cool",
3431+
"mode": "heat_cool",
34323432
"sensors": {
34333433
"temperature": 22.3,
34343434
"setpoint": 22.0,
@@ -3682,7 +3682,7 @@ async def test_connect_anna_elga_2_schedule_off(self):
36823682
"available_schedules": ["Thermostat schedule"],
36833683
"selected_schedule": "None",
36843684
"last_used": "Thermostat schedule",
3685-
"mode": "heat",
3685+
"mode": "heat_cool",
36863686
"sensors": {
36873687
"temperature": 20.9,
36883688
"illuminance": 0.5,
@@ -3698,6 +3698,7 @@ async def test_connect_anna_elga_2_schedule_off(self):
36983698
assert smile.smile_hostname == "smile000000"
36993699

37003700
await self.device_test(smile, testdata)
3701+
assert smile._cooling_present
37013702
assert self.device_items == 57
37023703

37033704
await smile.close_connection()

0 commit comments

Comments
 (0)