mirror of
https://github.com/home-assistant/core.git
synced 2025-07-28 07:37:34 +00:00
Use new reauth helpers in skybell (#128741)
This commit is contained in:
parent
8a16504988
commit
10b04f41df
@ -34,16 +34,11 @@ class SkybellFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||||||
errors = {}
|
errors = {}
|
||||||
if user_input:
|
if user_input:
|
||||||
password = user_input[CONF_PASSWORD]
|
password = user_input[CONF_PASSWORD]
|
||||||
entry_id = self.context["entry_id"]
|
_, error = await self._async_validate_input(self.reauth_email, password)
|
||||||
if entry := self.hass.config_entries.async_get_entry(entry_id):
|
if error is None:
|
||||||
_, error = await self._async_validate_input(self.reauth_email, password)
|
return self.async_update_reload_and_abort(
|
||||||
if error is None:
|
self._get_reauth_entry(), data_updates=user_input
|
||||||
self.hass.config_entries.async_update_entry(
|
)
|
||||||
entry,
|
|
||||||
data=entry.data | user_input,
|
|
||||||
)
|
|
||||||
await self.hass.config_entries.async_reload(entry.entry_id)
|
|
||||||
return self.async_abort(reason="reauth_successful")
|
|
||||||
|
|
||||||
errors["base"] = error
|
errors["base"] = error
|
||||||
return self.async_show_form(
|
return self.async_show_form(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user