Skip to content

Commit

Permalink
Use async_update_reload_and_abort in Trafikverket Camera (home-assist…
Browse files Browse the repository at this point in the history
  • Loading branch information
gjohansson-ST authored Sep 30, 2024
1 parent de6ca56 commit edcb4ec
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions homeassistant/components/trafikverket_camera/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,13 @@ async def async_step_reauth_confirm(
errors, _ = await self.validate_input(api_key, self.entry.data[CONF_ID])

if not errors:
self.hass.config_entries.async_update_entry(
return self.async_update_reload_and_abort(
self.entry,
data={
**self.entry.data,
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(
step_id="reauth_confirm",
Expand Down

0 comments on commit edcb4ec

Please sign in to comment.