mirror of
https://github.com/home-assistant/core.git
synced 2025-04-25 09:47:52 +00:00
Use _get_reauth_entry in bring config flow (#127325)
This commit is contained in:
parent
c306ebed49
commit
829af75416
@ -50,7 +50,7 @@ class BringConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
"""Handle a config flow for Bring!."""
|
||||
|
||||
VERSION = 1
|
||||
reauth_entry: BringConfigEntry | None = None
|
||||
reauth_entry: BringConfigEntry
|
||||
info: BringAuthResponse
|
||||
|
||||
async def async_step_user(
|
||||
@ -74,9 +74,7 @@ class BringConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
self, entry_data: Mapping[str, Any]
|
||||
) -> ConfigFlowResult:
|
||||
"""Perform reauth upon an API authentication error."""
|
||||
self.reauth_entry = self.hass.config_entries.async_get_entry(
|
||||
self.context["entry_id"]
|
||||
)
|
||||
self.reauth_entry = self._get_reauth_entry()
|
||||
return await self.async_step_reauth_confirm()
|
||||
|
||||
async def async_step_reauth_confirm(
|
||||
@ -85,8 +83,6 @@ class BringConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
"""Dialog that informs the user that reauth is required."""
|
||||
errors: dict[str, str] = {}
|
||||
|
||||
assert self.reauth_entry
|
||||
|
||||
if user_input is not None:
|
||||
if not (errors := await self.validate_input(user_input)):
|
||||
return self.async_update_reload_and_abort(
|
||||
|
Loading…
x
Reference in New Issue
Block a user