Skip to content

Commit 53348ba

Browse files
committed
counter-update: add debug-logging
1 parent 35d51e4 commit 53348ba

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

plugwise_usb/nodes/helpers/counter.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,12 @@ def update(
288288
if self._energy_id in ENERGY_DAY_COUNTERS:
289289
last_reset = last_reset.replace(hour=0, minute=0, second=0, microsecond=0)
290290
# Postpone the last_reset time-changes at day-end until a device pulsecounter resets
291+
_LOGGER.debug("energycounter_update | last reset hour=%s", last_reset.hour)
292+
_LOGGER.debug(
293+
"energycounter_update | pulse_counter_reset=%s, midnight_reset_passed=%s",
294+
pulse_collection.pulse_counter_reset,
295+
self._midnight_reset_passed,
296+
)
291297
if last_reset.hour == 0 and (
292298
not pulse_collection.pulse_counter_reset
293299
and not self._midnight_reset_passed

0 commit comments

Comments
 (0)