Skip to content

Commit e9772f5

Browse files
committed
CR: recommendations implemented
1 parent 9c0b4a6 commit e9772f5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,10 +1049,7 @@ async def update_node_details(
10491049
if (
10501050
node_info.current_logaddress_pointer is not None
10511051
and self._current_log_address is not None
1052-
and (
1053-
self._current_log_address > node_info.current_logaddress_pointer
1054-
or self._current_log_address == 1
1055-
)
1052+
and self._current_log_address > node_info.current_logaddress_pointer
10561053
):
10571054
# Rollover of log address
10581055
_LOGGER.debug(
@@ -1062,7 +1059,10 @@ async def update_node_details(
10621059
self._mac_in_str,
10631060
)
10641061

1065-
if node_info.current_logaddress_pointer is not None:
1062+
if (
1063+
node_info.current_logaddress_pointer is not None
1064+
and node_info.current_logaddress_pointer != self._current_log_address
1065+
):
10661066
self._current_log_address = node_info.current_logaddress_pointer
10671067

10681068
return await super().update_node_details(node_info)

0 commit comments

Comments
 (0)