Skip to content

Commit 4e041a3

Browse files
authored
Merge pull request #194 from plugwise/fix_#192
Fix for #192: improve OpenTherm/OnOff boiler detection
2 parents c7987d8 + dfcdee3 commit 4e041a3

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
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.18.5: Smile bugfix for #192
4+
35
# v0.18.4: Smile: schedule-related bug-fixes and clean-up
46
- Update `_last_used_schedule()`: provide the collected schedules as input in order to find the last-modified valid schedule.
57
- `_rule_ids_by_x()`: replace None by NONE, allowing for simpler typing.

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.18.4"
3+
__version__ = "0.18.5"
44

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

plugwise/helper.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -542,18 +542,10 @@ def _all_appliances(self) -> None:
542542
)
543543

544544
# Find the connected heating/cooling device (heater_central), e.g. heat-pump or gas-fired heater
545-
# Legacy Anna only:
546-
boiler_state = self._appliances.find(".//logs/point_log[type='boiler_state']")
547-
# Anna, Adam:
548-
c_heating_state = self._appliances.find(
549-
".//logs/point_log[type='central_heating_state']"
550-
)
551-
ot_fault_code = self._appliances.find(
552-
".//logs/point_log[type='open_therm_oem_fault_code']"
553-
)
554-
if boiler_state is not None or c_heating_state is not None:
555-
self._opentherm_device = ot_fault_code is not None
556-
self._on_off_device = ot_fault_code is None
545+
onoff_boiler = self._modules.find("./module/protocols/onoff_boiler")
546+
open_therm_boiler = self._modules.find("./module/protocols/open_therm_boiler")
547+
self._on_off_device = onoff_boiler is not None
548+
self._opentherm_device = open_therm_boiler is not None
557549

558550
for appliance in self._appliances.findall("./appliance"):
559551
appl = Munch()

0 commit comments

Comments
 (0)