diff --git a/homeassistant/components/abode/config_flow.py b/homeassistant/components/abode/config_flow.py index 715bc53e2b2..1cbab2bdbe4 100644 --- a/homeassistant/components/abode/config_flow.py +++ b/homeassistant/components/abode/config_flow.py @@ -1,6 +1,7 @@ """Config flow for the Abode Security System component.""" from __future__ import annotations +from collections.abc import Mapping from http import HTTPStatus from typing import Any, cast @@ -149,7 +150,7 @@ class AbodeFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): return await self._async_abode_mfa_login() - async def async_step_reauth(self, config: dict[str, Any]) -> FlowResult: + async def async_step_reauth(self, config: Mapping[str, Any]) -> FlowResult: """Handle reauthorization request from Abode.""" self._username = config[CONF_USERNAME] diff --git a/homeassistant/components/airvisual/config_flow.py b/homeassistant/components/airvisual/config_flow.py index 85ee4bf6ae5..516b8906092 100644 --- a/homeassistant/components/airvisual/config_flow.py +++ b/homeassistant/components/airvisual/config_flow.py @@ -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) diff --git a/homeassistant/components/aladdin_connect/config_flow.py b/homeassistant/components/aladdin_connect/config_flow.py index 153a63ffb06..f0f622b3ab7 100644 --- a/homeassistant/components/aladdin_connect/config_flow.py +++ b/homeassistant/components/aladdin_connect/config_flow.py @@ -1,6 +1,7 @@ """Config flow for Aladdin Connect cover integration.""" from __future__ import annotations +from collections.abc import Mapping import logging from typing import Any @@ -44,9 +45,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): VERSION = 1 entry: config_entries.ConfigEntry | None - async def async_step_reauth( - self, user_input: dict[str, Any] | None = None - ) -> FlowResult: + async def async_step_reauth(self, data: Mapping[str, Any]) -> FlowResult: """Handle re-authentication with Aladdin Connect.""" self.entry = self.hass.config_entries.async_get_entry(self.context["entry_id"]) diff --git a/homeassistant/components/ambee/config_flow.py b/homeassistant/components/ambee/config_flow.py index 0550c541ed0..6c11f01b759 100644 --- a/homeassistant/components/ambee/config_flow.py +++ b/homeassistant/components/ambee/config_flow.py @@ -1,6 +1,7 @@ """Config flow to configure the Ambee integration.""" from __future__ import annotations +from collections.abc import Mapping from typing import Any from ambee import Ambee, AmbeeAuthenticationError, AmbeeError @@ -71,7 +72,7 @@ class AmbeeFlowHandler(ConfigFlow, domain=DOMAIN): errors=errors, ) - async def async_step_reauth(self, data: dict[str, Any]) -> FlowResult: + async def async_step_reauth(self, data: Mapping[str, Any]) -> FlowResult: """Handle initiation of re-authentication with Ambee.""" self.entry = self.hass.config_entries.async_get_entry(self.context["entry_id"]) return await self.async_step_reauth_confirm() diff --git a/homeassistant/components/aussie_broadband/config_flow.py b/homeassistant/components/aussie_broadband/config_flow.py index 6e101250386..37de59d4767 100644 --- a/homeassistant/components/aussie_broadband/config_flow.py +++ b/homeassistant/components/aussie_broadband/config_flow.py @@ -1,6 +1,7 @@ """Config flow for Aussie Broadband integration.""" from __future__ import annotations +from collections.abc import Mapping from typing import Any from aiohttp import ClientError @@ -76,9 +77,9 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): errors=errors, ) - async def async_step_reauth(self, user_input: dict[str, str]) -> FlowResult: + async def async_step_reauth(self, data: Mapping[str, Any]) -> FlowResult: """Handle reauth on credential failure.""" - self._reauth_username = user_input[CONF_USERNAME] + self._reauth_username = data[CONF_USERNAME] return await self.async_step_reauth_confirm() diff --git a/homeassistant/components/brunt/config_flow.py b/homeassistant/components/brunt/config_flow.py index c81eb2de6ca..bba58deea45 100644 --- a/homeassistant/components/brunt/config_flow.py +++ b/homeassistant/components/brunt/config_flow.py @@ -1,6 +1,7 @@ """Config flow for brunt integration.""" from __future__ import annotations +from collections.abc import Mapping import logging from typing import Any @@ -77,9 +78,7 @@ class BruntConfigFlow(ConfigFlow, domain=DOMAIN): data=user_input, ) - async def async_step_reauth( - self, user_input: dict[str, Any] | None = None - ) -> FlowResult: + async def async_step_reauth(self, data: Mapping[str, Any]) -> FlowResult: """Perform reauth upon an API authentication error.""" self._reauth_entry = self.hass.config_entries.async_get_entry( self.context["entry_id"] diff --git a/homeassistant/components/cloudflare/config_flow.py b/homeassistant/components/cloudflare/config_flow.py index 121e0fc9974..af67cbe8ffc 100644 --- a/homeassistant/components/cloudflare/config_flow.py +++ b/homeassistant/components/cloudflare/config_flow.py @@ -1,6 +1,7 @@ """Config flow for Cloudflare integration.""" from __future__ import annotations +from collections.abc import Mapping import logging from typing import Any @@ -97,7 +98,7 @@ class CloudflareConfigFlow(ConfigFlow, domain=DOMAIN): self.zones: list[str] | None = None self.records: list[str] | None = None - async def async_step_reauth(self, data: dict[str, Any]) -> FlowResult: + async def async_step_reauth(self, data: Mapping[str, Any]) -> FlowResult: """Handle initiation of re-authentication with Cloudflare.""" self.entry = self.hass.config_entries.async_get_entry(self.context["entry_id"]) return await self.async_step_reauth_confirm() diff --git a/homeassistant/components/deconz/config_flow.py b/homeassistant/components/deconz/config_flow.py index 28205a7382d..6e2a286c168 100644 --- a/homeassistant/components/deconz/config_flow.py +++ b/homeassistant/components/deconz/config_flow.py @@ -3,6 +3,7 @@ from __future__ import annotations import asyncio +from collections.abc import Mapping from pprint import pformat from typing import Any, cast from urllib.parse import urlparse @@ -204,7 +205,7 @@ class DeconzFlowHandler(ConfigFlow, domain=DOMAIN): }, ) - async def async_step_reauth(self, config: dict[str, Any]) -> FlowResult: + async def async_step_reauth(self, config: Mapping[str, Any]) -> FlowResult: """Trigger a reauthentication flow.""" self.context["title_placeholders"] = {CONF_HOST: config[CONF_HOST]} diff --git a/homeassistant/components/deluge/config_flow.py b/homeassistant/components/deluge/config_flow.py index 2f38d4d447d..a4bb1893b7e 100644 --- a/homeassistant/components/deluge/config_flow.py +++ b/homeassistant/components/deluge/config_flow.py @@ -1,6 +1,7 @@ """Config flow for the Deluge integration.""" from __future__ import annotations +from collections.abc import Mapping import socket from ssl import SSLError from typing import Any @@ -75,7 +76,7 @@ class DelugeFlowHandler(ConfigFlow, domain=DOMAIN): ) return self.async_show_form(step_id="user", data_schema=schema, errors=errors) - async def async_step_reauth(self, config: dict[str, Any]) -> FlowResult: + async def async_step_reauth(self, config: Mapping[str, Any]) -> FlowResult: """Handle a reauthorization flow request.""" return await self.async_step_user() diff --git a/homeassistant/components/devolo_home_control/config_flow.py b/homeassistant/components/devolo_home_control/config_flow.py index e0e49197f45..fc1689e0742 100644 --- a/homeassistant/components/devolo_home_control/config_flow.py +++ b/homeassistant/components/devolo_home_control/config_flow.py @@ -1,6 +1,7 @@ """Config flow to configure the devolo home control integration.""" from __future__ import annotations +from collections.abc import Mapping from typing import Any import voluptuous as vol @@ -67,14 +68,14 @@ class DevoloHomeControlFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): step_id="zeroconf_confirm", errors={"base": "invalid_auth"} ) - async def async_step_reauth(self, user_input: dict[str, Any]) -> FlowResult: + async def async_step_reauth(self, data: Mapping[str, Any]) -> FlowResult: """Handle reauthentication.""" self._reauth_entry = self.hass.config_entries.async_get_entry( self.context["entry_id"] ) - self._url = user_input[CONF_MYDEVOLO] + self._url = data[CONF_MYDEVOLO] self.data_schema = { - vol.Required(CONF_USERNAME, default=user_input[CONF_USERNAME]): str, + vol.Required(CONF_USERNAME, default=data[CONF_USERNAME]): str, vol.Required(CONF_PASSWORD): str, } return await self.async_step_reauth_confirm() diff --git a/homeassistant/components/efergy/config_flow.py b/homeassistant/components/efergy/config_flow.py index 5ff6e9ba9f2..0abf99c2504 100644 --- a/homeassistant/components/efergy/config_flow.py +++ b/homeassistant/components/efergy/config_flow.py @@ -1,6 +1,7 @@ """Config flow for Efergy integration.""" from __future__ import annotations +from collections.abc import Mapping from typing import Any from pyefergy import Efergy, exceptions @@ -52,7 +53,7 @@ class EfergyFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): errors=errors, ) - async def async_step_reauth(self, config: dict[str, Any]) -> FlowResult: + async def async_step_reauth(self, config: Mapping[str, Any]) -> FlowResult: """Handle a reauthorization flow request.""" return await self.async_step_user() diff --git a/homeassistant/components/esphome/config_flow.py b/homeassistant/components/esphome/config_flow.py index b73743ee950..552d7ed420e 100644 --- a/homeassistant/components/esphome/config_flow.py +++ b/homeassistant/components/esphome/config_flow.py @@ -2,6 +2,7 @@ from __future__ import annotations from collections import OrderedDict +from collections.abc import Mapping from typing import Any from aioesphomeapi import ( @@ -63,7 +64,7 @@ class EsphomeFlowHandler(ConfigFlow, domain=DOMAIN): """Handle a flow initialized by the user.""" return await self._async_step_user_base(user_input=user_input) - async def async_step_reauth(self, data: dict[str, Any] | None = None) -> FlowResult: + async def async_step_reauth(self, data: Mapping[str, Any]) -> FlowResult: """Handle a flow initialized by a reauth event.""" entry = self.hass.config_entries.async_get_entry(self.context["entry_id"]) assert entry is not None