mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
Fix async_fire_time_changed in tests/common.py (#38705)
This commit is contained in:
committed by
Paulus Schoutsen
parent
77107e4501
commit
8fa1a1f600
@@ -295,8 +295,8 @@ def async_fire_time_changed(hass, datetime_, fire_all=False):
|
|||||||
if task.cancelled():
|
if task.cancelled():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
future_seconds = task.when() - hass.loop.time()
|
|
||||||
mock_seconds_into_future = datetime_.timestamp() - time.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:
|
if fire_all or mock_seconds_into_future >= future_seconds:
|
||||||
with patch(
|
with patch(
|
||||||
|
Reference in New Issue
Block a user