mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 12:47:08 +00:00
Fix async_fire_time_changed in tests/common.py (#38705)
This commit is contained in:
parent
77107e4501
commit
8fa1a1f600
@ -295,8 +295,8 @@ def async_fire_time_changed(hass, datetime_, fire_all=False):
|
||||
if task.cancelled():
|
||||
continue
|
||||
|
||||
future_seconds = task.when() - hass.loop.time()
|
||||
mock_seconds_into_future = datetime_.timestamp() - time.time()
|
||||
future_seconds = task.when() - hass.loop.time()
|
||||
|
||||
if fire_all or mock_seconds_into_future >= future_seconds:
|
||||
with patch(
|
||||
|
Loading…
x
Reference in New Issue
Block a user