Skip to content

Commit

Permalink
Use new config entry update/abort helper in onvif (#108680)
Browse files Browse the repository at this point in the history
Use new config entry update/abort helper in onvif

uses the new helper from #108034
  • Loading branch information
bdraco committed Jan 22, 2024
1 parent 17202e2 commit 9ee8832
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions homeassistant/components/onvif/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,7 @@ async def async_step_reauth_confirm(
configure_unique_id=False
)
if not errors:
hass = self.hass
entry_id = entry.entry_id
hass.config_entries.async_update_entry(entry, data=self.onvif_config)
hass.async_create_task(hass.config_entries.async_reload(entry_id))
return self.async_abort(reason="reauth_successful")
return self.async_update_reload_and_abort(entry, data=self.onvif_config)

username = (user_input or {}).get(CONF_USERNAME) or entry.data[CONF_USERNAME]
return self.async_show_form(
Expand Down

0 comments on commit 9ee8832

Please sign in to comment.