Use new config entry update/abort helper in onvif (#108680)

Use new config entry update/abort helper in onvif

uses the new helper from https://github.com/home-assistant/core/pull/108034
This commit is contained in:
J. Nick Koston 2024-01-22 12:01:08 -10:00 committed by GitHub
parent 17202e21f3
commit 9ee8832367
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -146,11 +146,7 @@ class OnvifFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
configure_unique_id=False
)
if not errors:
hass = self.hass
entry_id = entry.entry_id
hass.config_entries.async_update_entry(entry, data=self.onvif_config)
hass.async_create_task(hass.config_entries.async_reload(entry_id))
return self.async_abort(reason="reauth_successful")
return self.async_update_reload_and_abort(entry, data=self.onvif_config)
username = (user_input or {}).get(CONF_USERNAME) or entry.data[CONF_USERNAME]
return self.async_show_form(