Don't cache reauth entry in androidtv_remote config flow (#127900)

Don't cache reauth entry in androidtv_remote
pull/127903/head
epenet 2024-10-08 08:22:55 +02:00 committed by GitHub
parent 412acf943d
commit ea1ce6a263
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 3 deletions

View File

@ -63,7 +63,6 @@ class AndroidTVRemoteConfigFlow(ConfigFlow, domain=DOMAIN):
host: str
name: str
mac: str
reauth_entry: ConfigEntry
async def async_step_user(
self, user_input: dict[str, Any] | None = None
@ -107,7 +106,7 @@ class AndroidTVRemoteConfigFlow(ConfigFlow, domain=DOMAIN):
await self.api.async_finish_pairing(pin)
if self.source == SOURCE_REAUTH:
await self.hass.config_entries.async_reload(
self.reauth_entry.entry_id
self._get_reauth_entry().entry_id
)
return self.async_abort(reason="reauth_successful")
return self.async_create_entry(
@ -183,7 +182,6 @@ class AndroidTVRemoteConfigFlow(ConfigFlow, domain=DOMAIN):
self.host = entry_data[CONF_HOST]
self.name = entry_data[CONF_NAME]
self.mac = entry_data[CONF_MAC]
self.reauth_entry = self._get_reauth_entry()
return await self.async_step_reauth_confirm()
async def async_step_reauth_confirm(