Skip to content

Commit 4294476

Browse files
authored
Merge pull request #106 from plugwise/elga_heating
Fix Core Issue #59711
2 parents ab4448b + c05eb4d commit 4294476

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
22

3-
## v0.15.1 - Smile: Dependency update (aiohttp 3.8.0) and aligning other HA dependencies
3+
## v0.15.2 - Smile: Implement possible fix for HA Core issue #59711
4+
5+
## v0.15.1 - Smile: Dependency update (aiohttp 3.8.0) and aligning other HA Core dependencies
46

57
## v0.15.0 - Smile: remove all HA Core related-information from the provided output
68

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.15.1"
3+
__version__ = "0.15.2"
44

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

plugwise/constants.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,10 @@
437437
"intended_boiler_temperature": {
438438
ATTR_UNIT_OF_MEASUREMENT: TEMP_CELSIUS
439439
}, # non-zero when heating, zero when dhw-heating
440+
"central_heating_state": {
441+
ATTR_NAME: "c_heating_state",
442+
ATTR_UNIT_OF_MEASUREMENT: None,
443+
}, # for Elga (heatpump) use this instead of intended_central_heating_state
440444
"intended_central_heating_state": {
441445
ATTR_NAME: "heating_state",
442446
ATTR_UNIT_OF_MEASUREMENT: None,

plugwise/smile.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,12 @@ def _get_device_data(self, dev_id):
215215
if power_data is not None:
216216
device_data.update(power_data)
217217

218+
# Elga doesn't use intended_cental_heating_state to show the generic heating state
219+
if "c_heating_state" in device_data and "heating_state" in device_data:
220+
if device_data["c_heating_state"] and not device_data["heating_state"]:
221+
device_data["heating_state"] = True
222+
device_data.pop("c_heating_state")
223+
218224
# Switching groups data
219225
device_data = self._device_data_switching_group(details, device_data)
220226
# Specific, not generic Anna data

tests/test_smile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,6 +1562,8 @@ async def test_connect_anna_heatpump(self):
15621562
},
15631563
# Central
15641564
"1cbf783bb11e4a7c8a6843dee3a86927": {
1565+
"cooling_state": False,
1566+
"heating_state": True,
15651567
"binary_sensors": [
15661568
{
15671569
"id": "dhw_state",
@@ -1613,6 +1615,8 @@ async def test_connect_anna_heatpump_cooling(self):
16131615
},
16141616
# Central
16151617
"1cbf783bb11e4a7c8a6843dee3a86927": {
1618+
"cooling_state": True,
1619+
"heating_state": False,
16161620
"binary_sensors": [
16171621
{
16181622
"id": "dhw_state",

0 commit comments

Comments
 (0)