Skip to content

Commit a4553ec

Browse files
committed
create declaration for clock sync period and set to 1 hour
1 parent 8c258bf commit a4553ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@
7474
# Default firmware if not known
7575
DEFAULT_FIRMWARE: Final = datetime(2008, 8, 26, 15, 46, tzinfo=UTC)
7676

77-
MAX_LOG_HOURS = DAY_IN_HOURS
77+
MAX_LOG_HOURS: Final = DAY_IN_HOURS
78+
79+
CLOCK_SYNC_PERIOD: Final = 3600
7880

7981
FuncT = TypeVar("FuncT", bound=Callable[..., Any])
8082
_LOGGER = logging.getLogger(__name__)
@@ -858,7 +860,7 @@ async def _clock_synchronize_scheduler(self) -> None:
858860
"""Background task: periodically synchronize the clock until cancelled."""
859861
try:
860862
while True:
861-
await sleep(60)
863+
await sleep(CLOCK_SYNC_PERIOD)
862864
try:
863865
await self.clock_synchronize()
864866
except Exception:

0 commit comments

Comments
 (0)