From 15bd5bf6f6caa08f804f03e73c209765984cacb8 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 19 Oct 2024 14:57:32 +0200 Subject: [PATCH] Use new reauth helpers in sunweg (#128747) --- homeassistant/components/sunweg/config_flow.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/sunweg/config_flow.py b/homeassistant/components/sunweg/config_flow.py index 2b5e49c2cb9..24df8c02f55 100644 --- a/homeassistant/components/sunweg/config_flow.py +++ b/homeassistant/components/sunweg/config_flow.py @@ -124,12 +124,6 @@ class SunWEGConfigFlow(ConfigFlow, domain=DOMAIN): if conf_result is not None: return conf_result - entry = self.hass.config_entries.async_get_entry(self.context["entry_id"]) - if entry is not None: - data: Mapping[str, Any] = self.data - self.hass.config_entries.async_update_entry(entry, data=data) - self.hass.async_create_task( - self.hass.config_entries.async_reload(entry.entry_id) - ) - - return self.async_abort(reason="reauth_successful") + return self.async_update_reload_and_abort( + self._get_reauth_entry(), data=self.data + )