Migrate elkm1 to use async_schedule_reload (#115240)

This commit is contained in:
J. Nick Koston 2024-04-09 07:05:09 -10:00 committed by GitHub
parent 11af7d91ff
commit d2a3473454
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -174,9 +174,7 @@ class Elkm1ConfigFlow(ConfigFlow, domain=DOMAIN):
or hostname_from_url(entry.data[CONF_HOST]) == host
):
if async_update_entry_from_discovery(self.hass, entry, device):
self.hass.async_create_task(
self.hass.config_entries.async_reload(entry.entry_id)
)
self.hass.config_entries.async_schedule_reload(entry.entry_id)
return self.async_abort(reason="already_configured")
self.context[CONF_HOST] = host
for progress in self._async_in_progress():