Skip to content

Commit 1436bc0

Browse files
committed
Fix missing _node_protocols check
1 parent 1464f9d commit 1436bc0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

plugwise_usb/nodes/circle.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -903,14 +903,15 @@ async def clock_synchronize(self) -> bool:
903903
self._mac_in_str,
904904
int(abs(clock_offset.total_seconds())),
905905
)
906+
return await self._send_clock_set_req()
907+
908+
async def _send_clock_set_req(self) -> bool:
909+
"""Send CircleClockSetRequest."""
906910
if self._node_protocols is None:
907911
raise NodeError(
908912
"Unable to synchronize clock when protocol version is unknown"
909913
)
910-
return await self._send_clock_set_req()
911914

912-
async def _send_clock_set_req(self) -> bool:
913-
"""Send CircleClockSetRequest."""
914915
set_request = CircleClockSetRequest(
915916
self._send,
916917
self._mac_in_bytes,

0 commit comments

Comments
 (0)