mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Use async_update_reload_and_abort in Trafikverket Camera (#127137)
This commit is contained in:
parent
de6ca56504
commit
edcb4eca22
@ -74,15 +74,13 @@ class TVCameraConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
errors, _ = await self.validate_input(api_key, self.entry.data[CONF_ID])
|
errors, _ = await self.validate_input(api_key, self.entry.data[CONF_ID])
|
||||||
|
|
||||||
if not errors:
|
if not errors:
|
||||||
self.hass.config_entries.async_update_entry(
|
return self.async_update_reload_and_abort(
|
||||||
self.entry,
|
self.entry,
|
||||||
data={
|
data={
|
||||||
**self.entry.data,
|
**self.entry.data,
|
||||||
CONF_API_KEY: api_key,
|
CONF_API_KEY: api_key,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
await self.hass.config_entries.async_reload(self.entry.entry_id)
|
|
||||||
return self.async_abort(reason="reauth_successful")
|
|
||||||
|
|
||||||
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