Skip to content

Commit 5fec0d3

Browse files
committed
improve logging of clock offset value
1 parent a560643 commit 5fec0d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ async def clock_synchronize(self) -> bool:
888888
_LOGGER.info(
889889
"Reset clock of node %s because time has drifted %s sec",
890890
self._mac_in_str,
891-
str(clock_offset.seconds),
891+
str(int(abs(clock_offset.total_seconds()))),
892892
)
893893
if self._node_protocols is None:
894894
raise NodeError(

plugwise_usb/nodes/circle_plus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async def clock_synchronize(self) -> bool:
9191
_LOGGER.info(
9292
"Reset realtime clock of node %s because time has drifted %s seconds while max drift is set to %s seconds)",
9393
self._node_info.mac,
94-
str(clock_offset.seconds),
94+
str(int(abs(clock_offset.total_seconds()))),
9595
str(MAX_TIME_DRIFT),
9696
)
9797
clock_set_request = CirclePlusRealTimeClockSetRequest(

0 commit comments

Comments
 (0)