Use new reauth helpers in skybell (#128741)
parent
8a16504988
commit
10b04f41df
|
@ -34,16 +34,11 @@ class SkybellFlowHandler(ConfigFlow, domain=DOMAIN):
|
|||
errors = {}
|
||||
if user_input:
|
||||
password = user_input[CONF_PASSWORD]
|
||||
entry_id = self.context["entry_id"]
|
||||
if entry := self.hass.config_entries.async_get_entry(entry_id):
|
||||
_, error = await self._async_validate_input(self.reauth_email, password)
|
||||
if error is None:
|
||||
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")
|
||||
_, error = await self._async_validate_input(self.reauth_email, password)
|
||||
if error is None:
|
||||
return self.async_update_reload_and_abort(
|
||||
self._get_reauth_entry(), data_updates=user_input
|
||||
)
|
||||
|
||||
errors["base"] = error
|
||||
return self.async_show_form(
|
||||
|
|
Loading…
Reference in New Issue