Skip to content

Commit

Permalink
Use async_update_reload_and_abort on reauth
Browse files Browse the repository at this point in the history
  • Loading branch information
ollo69 committed Oct 11, 2024
1 parent 523bde1 commit 5a9aec1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions custom_components/smartthinq_sensors/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,14 +283,10 @@ def _save_config_entry(self) -> FlowResult:
# if an entry exists, we are reconfiguring
if entries := self._async_current_entries():
entry = entries[0]
self.hass.config_entries.async_update_entry(
return self.async_update_reload_and_abort(
entry=entry,
data=data,
)
self.hass.async_create_task(
self.hass.config_entries.async_reload(entry.entry_id)
)
return self.async_abort(reason="reconfigured")

return self.async_create_entry(title="LGE Devices", data=data)

Expand Down

0 comments on commit 5a9aec1

Please sign in to comment.