mirror of
https://github.com/home-assistant/core.git
synced 2025-04-26 02:07:54 +00:00
Use new reauth helpers in tautulli (#128758)
This commit is contained in:
parent
15bd5bf6f6
commit
5fb7bb50e0
@ -60,14 +60,11 @@ class TautulliConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
) -> ConfigFlowResult:
|
) -> ConfigFlowResult:
|
||||||
"""Confirm reauth dialog."""
|
"""Confirm reauth dialog."""
|
||||||
errors = {}
|
errors = {}
|
||||||
if user_input is not None and (
|
if user_input is not None:
|
||||||
entry := self.hass.config_entries.async_get_entry(self.context["entry_id"])
|
reauth_entry = self._get_reauth_entry()
|
||||||
):
|
_input = {**reauth_entry.data, CONF_API_KEY: user_input[CONF_API_KEY]}
|
||||||
_input = {**entry.data, CONF_API_KEY: user_input[CONF_API_KEY]}
|
|
||||||
if (error := await self.validate_input(_input)) is None:
|
if (error := await self.validate_input(_input)) is None:
|
||||||
self.hass.config_entries.async_update_entry(entry, data=_input)
|
return self.async_update_reload_and_abort(reauth_entry, data=_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(
|
||||||
step_id="reauth_confirm",
|
step_id="reauth_confirm",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user