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:
J. Nick Koston 2024-03-10 17:23:02 -10:00 committed by GitHub
parent cddce0ce0d
commit b8b8e44454
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -142,7 +142,7 @@ def async_track_time_interval_backoff(
)
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:
"""Remove interval listener."""