mirror of
https://github.com/home-assistant/core.git
synced 2025-07-30 10:48:01 +02:00
Use reauth helpers in huawei_lte (#128630)
This commit is contained in:
@ -320,8 +320,7 @@ class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
self, user_input: dict[str, Any] | None = None
|
self, user_input: dict[str, Any] | None = None
|
||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Dialog that informs the user that reauth is required."""
|
"""Dialog that informs the user that reauth is required."""
|
||||||
entry = self.hass.config_entries.async_get_entry(self.context["entry_id"])
|
entry = self._get_reauth_entry()
|
||||||
assert entry
|
|
||||||
if not user_input:
|
if not user_input:
|
||||||
return await self._async_show_reauth_form(
|
return await self._async_show_reauth_form(
|
||||||
user_input={
|
user_input={
|
||||||
@ -340,9 +339,7 @@ class ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
user_input=user_input, errors=errors
|
user_input=user_input, errors=errors
|
||||||
)
|
)
|
||||||
|
|
||||||
self.hass.config_entries.async_update_entry(entry, data=new_data)
|
return self.async_update_reload_and_abort(entry, data=new_data)
|
||||||
await self.hass.config_entries.async_reload(entry.entry_id)
|
|
||||||
return self.async_abort(reason="reauth_successful")
|
|
||||||
|
|
||||||
|
|
||||||
class OptionsFlowHandler(OptionsFlow):
|
class OptionsFlowHandler(OptionsFlow):
|
||||||
|
Reference in New Issue
Block a user