File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,8 @@ async def clock_synchronize(self) -> bool:
7777 await self ._available_update_state (True , response .timestamp )
7878
7979 dt_now = datetime .now (tz = UTC )
80+ _LOGGER .debug ("HOI dt_now weekday=%s" , dt_now .weekday ())
81+ _LOGGER .debug ("HOI circle+ day_of_week=%s" , response .day_of_week .value )
8082 days_diff = (response .day_of_week .value - dt_now .weekday ()) % 7
8183 circle_plus_timestamp : datetime = dt_now .replace (
8284 day = (dt_now .day + days_diff ),
@@ -86,6 +88,8 @@ async def clock_synchronize(self) -> bool:
8688 microsecond = 0 ,
8789 tzinfo = UTC ,
8890 )
91+ _LOGGER .debug ("HOI circle+ clock=%s" , circle_plus_timestamp )
92+ _LOGGER .debug ("HOI response timestamp=%s" , response .timestamp )
8993 clock_offset = response .timestamp .replace (microsecond = 0 ) - circle_plus_timestamp
9094 if abs (clock_offset .total_seconds ()) < MAX_TIME_DRIFT :
9195 return True
You can’t perform that action at this time.
0 commit comments