Skip to content

Commit fe96f99

Browse files
committed
Change-update _logs_missing logging
1 parent dbe9fd8 commit fe96f99

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,11 +803,12 @@ def _logs_missing(self, from_timestamp: datetime) -> list[int] | None:
803803
if self._logs[address][slot].timestamp <= from_timestamp:
804804
break
805805

806+
_LOGGER.debug(
807+
"_logs_missing | %s | missing in range=%s", self._mac, missing
808+
)
809+
806810
# return missing logs in range first
807811
if len(missing) > 0:
808-
_LOGGER.debug(
809-
"_logs_missing | %s | missing in range=%s", self._mac, missing
810-
)
811812
return missing
812813

813814
if first_address not in self._logs:
@@ -841,6 +842,11 @@ def _logs_missing(self, from_timestamp: datetime) -> list[int] | None:
841842
calculated_timestamp = self._logs[first_address][
842843
first_slot
843844
].timestamp - timedelta(minutes=log_interval)
845+
_LOGGER.debug(
846+
"_logs_missing | %s | calculated timestamp=%s",
847+
self._mac,
848+
calculated_timestamp,
849+
)
844850
while from_timestamp < calculated_timestamp:
845851
if (
846852
address == self._first_empty_log_address

0 commit comments

Comments
 (0)