Skip to content

Commit f4eebe4

Browse files
committed
Improve OpenTherm/OnOff boiler detection
1 parent c7987d8 commit f4eebe4

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

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)