Skip to content

Commit 753ec7b

Browse files
committed
Add more _logs_missing() debugging
1 parent 9dca826 commit 753ec7b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,6 +895,9 @@ def _logs_missing(self, from_timestamp: datetime) -> list[int] | None:
895895
# Collect any missing address in current range
896896
count = 0
897897
address = last_address
898+
_LOGGER.debug(
899+
"_logs_missing | %s | last_address=%s", self._mac, last_address
900+
)
898901
slot = last_slot
899902
while not (
900903
(address == first_address and slot == first_slot)
@@ -903,7 +906,9 @@ def _logs_missing(self, from_timestamp: datetime) -> list[int] | None:
903906
address, slot = calc_log_address(address, slot, -1)
904907
if address in missing:
905908
continue
909+
_LOGGER.debug("address=%s, slot=%s", address, slot)
906910
if not self._log_exists(address, slot):
911+
_LOGGER.debug("Address-slot without log: %s, %s", address, slot)
907912
missing.append(address)
908913
continue
909914
if self._logs[address][slot].timestamp <= from_timestamp:

0 commit comments

Comments
 (0)