Skip to content

Commit

Permalink
Use reauth helpers in huawei_lte (home-assistant#128630)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Oct 18, 2024
1 parent 1d5821a commit 409f1bb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions homeassistant/components/huawei_lte/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,7 @@ async def async_step_reauth_confirm(
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={
Expand All @@ -340,9 +339,7 @@ async def async_step_reauth_confirm(
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):
Expand Down

0 comments on commit 409f1bb

Please sign in to comment.