Skip to content

Commit e713c0f

Browse files
authored
Merge pull request #195 from plugwise/improve
Move boiler-type detection into connect()
2 parents ccc4094 + b2e97b7 commit e713c0f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

plugwise/helper.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -541,12 +541,6 @@ def _all_appliances(self) -> None:
541541
}
542542
)
543543

544-
# Find the connected heating/cooling device (heater_central), e.g. heat-pump or gas-fired heater
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
549-
550544
for appliance in self._appliances.findall("./appliance"):
551545
appl = Munch()
552546

plugwise/smile.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,12 @@ async def connect(self) -> bool:
276276
"Plugwise invalid setup error, check log for more info."
277277
)
278278

279+
# Find the connected heating/cooling device (heater_central), e.g. heat-pump or gas-fired heater
280+
onoff_boiler: etree = result.find("./module/protocols/onoff_boiler")
281+
open_therm_boiler: etree = result.find("./module/protocols/open_therm_boiler")
282+
self._on_off_device = onoff_boiler is not None
283+
self._opentherm_device = open_therm_boiler is not None
284+
279285
# Determine smile specifics
280286
await self._smile_detect(result, dsmrmain)
281287

0 commit comments

Comments
 (0)