Skip to content

Commit c21b742

Browse files
committed
Handle last_address < first_address
1 parent 1017840 commit c21b742

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,13 @@ def _logs_missing(self, from_timestamp: datetime) -> list[int] | None:
818818
last_address,
819819
)
820820

821+
if last_address < first_address:
822+
_LOGGER.debug(
823+
"_logs_missing | %s | first_address > last_address, ignoring",
824+
self._mac,
825+
)
826+
return
827+
821828
if (
822829
last_address == first_address
823830
and last_slot == first_slot

0 commit comments

Comments
 (0)