mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Fix async_fire_time_changed in tests/common.py (#38705)
This commit is contained in:
parent
9bb7b3b125
commit
4c8c8a8c99
@ -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