File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ async def _available_update_state(
416416 if (
417417 self ._last_seen is not None
418418 and timestamp is not None
419- and ( timestamp - self ._last_seen ).total_seconds > 5
419+ and int (( timestamp - self ._last_seen ).total_seconds ()) > 5
420420
421421 ):
422422 self ._last_seen = timestamp
Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ def _motion_from_cache(self) -> bool:
174174 if (
175175 cached_motion_state == "True"
176176 and (motion_timestamp := self ._motion_timestamp_from_cache ()) is not None
177- and ( datetime .now (tz = UTC ) - motion_timestamp ).total_seconds < self ._reset_timer_from_cache () * 60
177+ and int (( datetime .now (tz = UTC ) - motion_timestamp ).total_seconds ()) < self ._reset_timer_from_cache () * 60
178178 ):
179179 return True
180180 return False
@@ -383,7 +383,7 @@ async def _motion_state_update(
383383 self ._set_cache (CACHE_MOTION_STATE , "False" )
384384 if self ._motion_state .state is None or self ._motion_state .state :
385385 if self ._reset_timer_motion_on is not None :
386- reset_timer = ( timestamp - self ._reset_timer_motion_on ).total_seconds
386+ reset_timer = int (( timestamp - self ._reset_timer_motion_on ).total_seconds ())
387387 if self ._motion_config .reset_timer is None :
388388 self ._motion_config = replace (
389389 self ._motion_config ,
You can’t perform that action at this time.
0 commit comments