Skip to content

Commit 9c339b1

Browse files
committed
Add debug-log-message
1 parent 066dfe6 commit 9c339b1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ def add_empty_log(self, address: int, slot: int) -> None:
415415
):
416416
self._last_empty_log_slot = slot
417417
recalculate = True
418+
418419
if recalculate:
419420
self.recalculate_missing_log_addresses()
420421

@@ -934,14 +935,21 @@ def _logs_missing(self, from_timestamp: datetime) -> list[int] | None:
934935
calculated_timestamp = self._logs[first_address][
935936
first_slot
936937
].timestamp - timedelta(minutes=log_interval)
938+
_LOGGER.debug(
939+
"_logs_missing | %s | first_empty_log_address=%s",
940+
self._mac,
941+
self._first_empty_log_address,
942+
)
937943
while from_timestamp < calculated_timestamp:
938944
if (
939945
address == self._first_empty_log_address
940946
and slot == self._first_empty_log_slot
941947
):
942948
break
949+
943950
if address not in missing:
944951
missing.append(address)
952+
945953
calculated_timestamp -= timedelta(minutes=log_interval)
946954
address, slot = calc_log_address(address, slot, -1)
947955

0 commit comments

Comments
 (0)