Use new reauth helpers in tplink_omada (#128762)

pull/128808/head
epenet 2024-10-19 14:42:03 +02:00 committed by GitHub
parent f02c14d327
commit 5d5355bc41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 8 deletions

View File

@ -179,15 +179,9 @@ class TpLinkOmadaConfigFlow(ConfigFlow, domain=DOMAIN):
if info is not None:
# Auth successful - update the config entry with the new credentials
entry = self.hass.config_entries.async_get_entry(
self.context["entry_id"]
return self.async_update_reload_and_abort(
self._get_reauth_entry(), data=self._omada_opts
)
assert entry is not None
self.hass.config_entries.async_update_entry(
entry, data=self._omada_opts
)
await self.hass.config_entries.async_reload(entry.entry_id)
return self.async_abort(reason="reauth_successful")
return self.async_show_form(
step_id="reauth_confirm",