From 5a9aec19eccf9420cbf0d8eb95b995ee9144b79e Mon Sep 17 00:00:00 2001 From: ollo69 Date: Fri, 11 Oct 2024 08:38:45 +0000 Subject: [PATCH] Use async_update_reload_and_abort on reauth --- custom_components/smartthinq_sensors/config_flow.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/custom_components/smartthinq_sensors/config_flow.py b/custom_components/smartthinq_sensors/config_flow.py index 3f666a0f..f4c4139c 100644 --- a/custom_components/smartthinq_sensors/config_flow.py +++ b/custom_components/smartthinq_sensors/config_flow.py @@ -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)