Skip to content

Commit ac30e3f

Browse files
committed
Line up circle code in detail
1 parent 444ed47 commit ac30e3f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -910,14 +910,12 @@ async def clock_synchronize(self) -> bool:
910910
datetime.now(tz=UTC),
911911
self._node_protocols.max,
912912
)
913-
if (node_response := await set_request.send()) is None:
914-
_LOGGER.warning(
915-
"Failed to (re)set the internal clock of %s",
916-
self.name,
917-
)
918-
return False
919-
if node_response.ack_id == NodeResponseType.CLOCK_ACCEPTED:
920-
return True
913+
if (node_response := await set_request.send()) is not None:
914+
return node_response.ack_id == NodeResponseType.CLOCK_ACCEPTED
915+
_LOGGER.warning(
916+
"Failed to (re)set the internal realtime clock of %s",
917+
self.name,
918+
)
921919
return False
922920

923921
async def load(self) -> None:

0 commit comments

Comments
 (0)