From b588bd6e4f85ecbd22672ee4ec56c8466a92b262 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sun, 20 Oct 2024 09:43:55 +0200 Subject: [PATCH] Use new reauth helpers in weatherflow_cloud (#128821) --- .../components/weatherflow_cloud/config_flow.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/homeassistant/components/weatherflow_cloud/config_flow.py b/homeassistant/components/weatherflow_cloud/config_flow.py index cbb83b6f25b..bdd3003e6b6 100644 --- a/homeassistant/components/weatherflow_cloud/config_flow.py +++ b/homeassistant/components/weatherflow_cloud/config_flow.py @@ -49,15 +49,11 @@ class WeatherFlowCloudConfigFlow(ConfigFlow, domain=DOMAIN): errors = await _validate_api_token(api_token) if not errors: # Update the existing entry and abort - if existing_entry := self.hass.config_entries.async_get_entry( - self.context["entry_id"] - ): - return self.async_update_reload_and_abort( - existing_entry, - data={CONF_API_TOKEN: api_token}, - reason="reauth_successful", - reload_even_if_entry_is_unchanged=False, - ) + return self.async_update_reload_and_abort( + self._get_reauth_entry(), + data={CONF_API_TOKEN: api_token}, + reload_even_if_entry_is_unchanged=False, + ) return self.async_show_form( step_id="reauth_confirm",