Use reauth helpers in huawei_lte (#128630)
This commit is contained in:
parent
1d5821abca
commit
409f1bb644
1 changed files with 2 additions and 5 deletions
|
@ -320,8 +320,7 @@ class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||
self, user_input: dict[str, Any] | None = None
|
||||
) -> ConfigFlowResult:
|
||||
"""Dialog that informs the user that reauth is required."""
|
||||
entry = self.hass.config_entries.async_get_entry(self.context["entry_id"])
|
||||
assert entry
|
||||
entry = self._get_reauth_entry()
|
||||
if not user_input:
|
||||
return await self._async_show_reauth_form(
|
||||
user_input={
|
||||
|
@ -340,9 +339,7 @@ class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||
user_input=user_input, errors=errors
|
||||
)
|
||||
|
||||
self.hass.config_entries.async_update_entry(entry, data=new_data)
|
||||
await self.hass.config_entries.async_reload(entry.entry_id)
|
||||
return self.async_abort(reason="reauth_successful")
|
||||
return self.async_update_reload_and_abort(entry, data=new_data)
|
||||
|
||||
|
||||
class OptionsFlowHandler(OptionsFlow):
|
||||
|
|
Loading…
Add table
Reference in a new issue