From 79e8a694ad660dce74dbe341ef8e7f48e5ce3f6b Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Tue, 8 Oct 2024 08:56:30 +0200 Subject: [PATCH] Don't cache reauth entry in aseko_pool_live config flow (#127902) --- .../components/aseko_pool_live/config_flow.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/homeassistant/components/aseko_pool_live/config_flow.py b/homeassistant/components/aseko_pool_live/config_flow.py index eacb7f2a42d..a07395742fe 100644 --- a/homeassistant/components/aseko_pool_live/config_flow.py +++ b/homeassistant/components/aseko_pool_live/config_flow.py @@ -9,12 +9,7 @@ from typing import Any from aioaseko import Aseko, AsekoAPIError, AsekoInvalidCredentials import voluptuous as vol -from homeassistant.config_entries import ( - SOURCE_REAUTH, - ConfigEntry, - ConfigFlow, - ConfigFlowResult, -) +from homeassistant.config_entries import SOURCE_REAUTH, ConfigFlow, ConfigFlowResult from homeassistant.const import CONF_EMAIL, CONF_PASSWORD, CONF_UNIQUE_ID from .const import DOMAIN @@ -34,8 +29,6 @@ class AsekoConfigFlow(ConfigFlow, domain=DOMAIN): } ) - reauth_entry: ConfigEntry - async def get_account_info(self, email: str, password: str) -> dict: """Get account info from the mobile API and the web API.""" aseko = Aseko(email, password) @@ -79,7 +72,7 @@ class AsekoConfigFlow(ConfigFlow, domain=DOMAIN): if self.source == SOURCE_REAUTH: return self.async_update_reload_and_abort( - self.reauth_entry, + self._get_reauth_entry(), title=info[CONF_EMAIL], data={ CONF_EMAIL: info[CONF_EMAIL], @@ -102,9 +95,6 @@ class AsekoConfigFlow(ConfigFlow, domain=DOMAIN): self, entry_data: Mapping[str, Any] ) -> ConfigFlowResult: """Perform reauth upon an API authentication error.""" - - self.reauth_entry = self._get_reauth_entry() - return await self.async_step_reauth_confirm() async def async_step_reauth_confirm(