Skip to content
Snippets Groups Projects
Unverified Commit 10b04f41 authored by epenet's avatar epenet Committed by GitHub
Browse files

Use new reauth helpers in skybell (#128741)

parent 8a165049
No related branches found
No related tags found
No related merge requests found
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment