Use Mapping for async_step_reauth (a-e) (#72763)

* Adjust abode

* Adjust airvisual

* Adjust aladdin_connect

* Adjust ambee

* Adjust aussie-broadband

* Adjust brunt

* Adjust cloudflare

* Adjust deconz

* Adjust deluge

* Adjust devolo_home_control

* Adjust efergy

* Adjust esphome
This commit is contained in:
epenet 2022-06-20 09:08:11 +02:00 committed by GitHub
parent 1f4add0119
commit bd29b91867
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 29 additions and 20 deletions

View file

@ -2,6 +2,8 @@
from __future__ import annotations
import asyncio
from collections.abc import Mapping
from typing import Any
from pyairvisual import CloudAPI, NodeSamba
from pyairvisual.errors import (
@ -70,7 +72,7 @@ class AirVisualFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
def __init__(self) -> None:
"""Initialize the config flow."""
self._entry_data_for_reauth: dict[str, str] = {}
self._entry_data_for_reauth: Mapping[str, Any] = {}
self._geo_id: str | None = None
@property
@ -219,7 +221,7 @@ class AirVisualFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
data={**user_input, CONF_INTEGRATION_TYPE: INTEGRATION_TYPE_NODE_PRO},
)
async def async_step_reauth(self, data: dict[str, str]) -> FlowResult:
async def async_step_reauth(self, data: Mapping[str, Any]) -> FlowResult:
"""Handle configuration by re-auth."""
self._entry_data_for_reauth = data
self._geo_id = async_get_geography_id(data)