Don't cache reauth entry in aseko_pool_live config flow (#127902)

This commit is contained in:
epenet 2024-10-08 08:56:30 +02:00 committed by GitHub
parent 4a202eca59
commit 79e8a694ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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(