Skip to content

Commit b41768e

Browse files
committed
Move collection of dhw_allowed_modes
1 parent 858cd64 commit b41768e

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

plugwise/__init__.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,6 @@ def _get_device_data(self, dev_id: str) -> DeviceData:
340340
device_data["sensors"]["outdoor_temperature"] = outdoor_temperature
341341
self._count += 1
342342

343-
# Show the allowed dhw_modes (Loria only)
344-
if device["dev_class"] == "heater_central" and self._dhw_allowed_modes:
345-
device_data["dhw_modes"] = self._dhw_allowed_modes
346-
self._count += 1
347-
348343
# Check availability of non-legacy wired-connected devices
349344
if not self._smile_legacy:
350345
self._check_availability(device, device_data)

plugwise/helper.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,10 @@ def _get_measurement_data(self, dev_id: str) -> DeviceData:
10161016
measurements = DEVICE_MEASUREMENTS
10171017
if self._is_thermostat and dev_id == self._heater_id:
10181018
measurements = HEATER_CENTRAL_MEASUREMENTS
1019+
# Show the allowed dhw_modes (Loria only)
1020+
if self._dhw_allowed_modes:
1021+
data["dhw_modes"] = self._dhw_allowed_modes
1022+
# Counting of this item is done in _appliance_measurements()
10191023

10201024
if (
10211025
appliance := self._appliances.find(f'./appliance[@id="{dev_id}"]')

0 commit comments

Comments
 (0)