mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Migrate duckdns to use async_run_hass_job (#113012)
The code would create a hassjob and than run the wrapped function with async_run_job so it had to work out the job type twice
This commit is contained in:
parent
cddce0ce0d
commit
b8b8e44454
@ -142,7 +142,7 @@ def async_track_time_interval_backoff(
|
|||||||
)
|
)
|
||||||
|
|
||||||
interval_listener_job = HassJob(interval_listener, cancel_on_shutdown=True)
|
interval_listener_job = HassJob(interval_listener, cancel_on_shutdown=True)
|
||||||
hass.async_run_job(interval_listener, dt_util.utcnow())
|
hass.async_run_hass_job(interval_listener_job, dt_util.utcnow())
|
||||||
|
|
||||||
def remove_listener() -> None:
|
def remove_listener() -> None:
|
||||||
"""Remove interval listener."""
|
"""Remove interval listener."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user