Skip to content

Commit 51d565b

Browse files
committed
Debug
1 parent c21bfc0 commit 51d565b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

plugwise/data.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from plugwise.constants import (
1010
ADAM,
1111
ANNA,
12+
LOGGER,
1213
MAX_SETPOINT,
1314
MIN_SETPOINT,
1415
NONE,
@@ -55,10 +56,13 @@ def _update_climates(self) -> None:
5556
5657
Collect data for each climate-location and add to self.climate_data.
5758
"""
59+
LOGGER.debug("HOI 1 climates: %s", self.climate_data)
5860
for location_id, climate in self.climate_data.items():
5961
data = self._get_location_data(location_id)
6062
climate.update(data)
6163

64+
65+
6266
def _update_gw_devices(self) -> None:
6367
"""Helper-function for _all_device_data() and async_update().
6468
@@ -156,7 +160,22 @@ def _get_location_data(self, loc_id: str) -> DeviceData:
156160
Provide device-data, based on Location ID (= loc_id).
157161
"""
158162
climate = self.climate_data[loc_id]
163+
# data = self._get_climate_data(loc_id)
164+
if ctrl_state := self._control_state(loc_id):
165+
data["control_state"] = ctrl_state
166+
self._count += 1
167+
168+
# Thermostat data (presets, temperatures etc)
169+
self._device_data_climate(loc_id, climate, data)
170+
171+
def _get_device_data(self, dev_id: str) -> DeviceData:
172+
"""Helper-function for _all_device_data() and async_update().
173+
174+
Provide device-data, based on appliance_id ()= dev_id).
175+
"""
176+
climate = self.climate_data[loc_id]
159177
data = self._get_climate_data(loc_id)
178+
LOGGER.debug("HOI 2 climate: %s", data)
160179
if ctrl_state := self._control_state(loc_id):
161180
data["control_state"] = ctrl_state
162181
self._count += 1

0 commit comments

Comments
 (0)