diff --git a/homeassistant/components/fritz/config_flow.py b/homeassistant/components/fritz/config_flow.py index 3e6961f585d..afb1708cac1 100644 --- a/homeassistant/components/fritz/config_flow.py +++ b/homeassistant/components/fritz/config_flow.py @@ -1,6 +1,7 @@ """Config flow to configure the FRITZ!Box Tools integration.""" from __future__ import annotations +from collections.abc import Mapping import ipaddress import logging import socket @@ -230,7 +231,7 @@ class FritzBoxToolsFlowHandler(ConfigFlow, domain=DOMAIN): return self._async_create_entry() - async def async_step_reauth(self, data: dict[str, Any]) -> FlowResult: + async def async_step_reauth(self, data: Mapping[str, Any]) -> FlowResult: """Handle flow upon an API authentication error.""" self._entry = self.hass.config_entries.async_get_entry(self.context["entry_id"]) self._host = data[CONF_HOST] diff --git a/homeassistant/components/fritzbox/config_flow.py b/homeassistant/components/fritzbox/config_flow.py index bf290cb28f7..d183c4a8d5e 100644 --- a/homeassistant/components/fritzbox/config_flow.py +++ b/homeassistant/components/fritzbox/config_flow.py @@ -1,6 +1,7 @@ """Config flow for AVM FRITZ!SmartHome.""" from __future__ import annotations +from collections.abc import Mapping import ipaddress from typing import Any from urllib.parse import urlparse @@ -175,7 +176,7 @@ class FritzboxConfigFlow(ConfigFlow, domain=DOMAIN): errors=errors, ) - async def async_step_reauth(self, data: dict[str, str]) -> FlowResult: + async def async_step_reauth(self, data: Mapping[str, Any]) -> FlowResult: """Trigger a reauthentication flow.""" entry = self.hass.config_entries.async_get_entry(self.context["entry_id"]) assert entry is not None diff --git a/homeassistant/components/hyperion/config_flow.py b/homeassistant/components/hyperion/config_flow.py index 4d6253cb161..8b8f8b62c47 100644 --- a/homeassistant/components/hyperion/config_flow.py +++ b/homeassistant/components/hyperion/config_flow.py @@ -2,6 +2,7 @@ from __future__ import annotations import asyncio +from collections.abc import Mapping from contextlib import suppress import logging from typing import Any @@ -142,7 +143,7 @@ class HyperionConfigFlow(ConfigFlow, domain=DOMAIN): async def async_step_reauth( self, - config_data: dict[str, Any], + config_data: Mapping[str, Any], ) -> FlowResult: """Handle a reauthentication flow.""" self._data = dict(config_data) diff --git a/homeassistant/components/isy994/config_flow.py b/homeassistant/components/isy994/config_flow.py index 34d4738db68..ff14c9bfc33 100644 --- a/homeassistant/components/isy994/config_flow.py +++ b/homeassistant/components/isy994/config_flow.py @@ -1,6 +1,7 @@ """Config flow for Universal Devices ISY994 integration.""" from __future__ import annotations +from collections.abc import Mapping import logging from typing import Any from urllib.parse import urlparse, urlunparse @@ -254,7 +255,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): return await self.async_step_user() async def async_step_reauth( - self, user_input: dict[str, Any] | None = None + self, data: Mapping[str, Any] ) -> data_entry_flow.FlowResult: """Handle reauth.""" self._existing_entry = await self.async_set_unique_id(self.context["unique_id"]) diff --git a/homeassistant/components/laundrify/config_flow.py b/homeassistant/components/laundrify/config_flow.py index d8230863d7c..c091324d9a7 100644 --- a/homeassistant/components/laundrify/config_flow.py +++ b/homeassistant/components/laundrify/config_flow.py @@ -1,6 +1,7 @@ """Config flow for laundrify integration.""" from __future__ import annotations +from collections.abc import Mapping import logging from typing import Any @@ -76,9 +77,7 @@ class LaundrifyConfigFlow(ConfigFlow, domain=DOMAIN): step_id="init", data_schema=CONFIG_SCHEMA, errors=errors ) - 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.""" return await self.async_step_reauth_confirm() diff --git a/homeassistant/components/meater/config_flow.py b/homeassistant/components/meater/config_flow.py index 07dbd4bd4a5..8d5e459fbce 100644 --- a/homeassistant/components/meater/config_flow.py +++ b/homeassistant/components/meater/config_flow.py @@ -1,6 +1,9 @@ """Config flow for Meater.""" from __future__ import annotations +from collections.abc import Mapping +from typing import Any + from meater import AuthenticationError, MeaterApi, ServiceUnavailableError import voluptuous as vol @@ -42,7 +45,7 @@ class MeaterConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): return await self._try_connect_meater("user", None, username, password) - 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._data_schema = REAUTH_SCHEMA self._username = data[CONF_USERNAME] diff --git a/homeassistant/components/nam/config_flow.py b/homeassistant/components/nam/config_flow.py index 1727ddff162..df41eb7c5f1 100644 --- a/homeassistant/components/nam/config_flow.py +++ b/homeassistant/components/nam/config_flow.py @@ -2,6 +2,7 @@ from __future__ import annotations import asyncio +from collections.abc import Mapping import logging from typing import Any @@ -164,7 +165,7 @@ class NAMFlowHandler(config_entries.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 configuration by re-auth.""" if entry := self.hass.config_entries.async_get_entry(self.context["entry_id"]): self.entry = entry diff --git a/homeassistant/components/nanoleaf/config_flow.py b/homeassistant/components/nanoleaf/config_flow.py index ed63754697a..eb8bbb1ec66 100644 --- a/homeassistant/components/nanoleaf/config_flow.py +++ b/homeassistant/components/nanoleaf/config_flow.py @@ -1,6 +1,7 @@ """Config flow for Nanoleaf integration.""" from __future__ import annotations +from collections.abc import Mapping import logging import os from typing import Any, Final, cast @@ -77,7 +78,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): ) return await self.async_step_link() - async def async_step_reauth(self, data: dict[str, str]) -> FlowResult: + async def async_step_reauth(self, data: Mapping[str, Any]) -> FlowResult: """Handle Nanoleaf reauth flow if token is invalid.""" self.reauth_entry = cast( config_entries.ConfigEntry, diff --git a/homeassistant/components/notion/config_flow.py b/homeassistant/components/notion/config_flow.py index c9e59107c1b..56093067711 100644 --- a/homeassistant/components/notion/config_flow.py +++ b/homeassistant/components/notion/config_flow.py @@ -1,6 +1,7 @@ """Config flow to configure the Notion integration.""" from __future__ import annotations +from collections.abc import Mapping from typing import TYPE_CHECKING, Any from aionotion import async_get_client @@ -73,7 +74,7 @@ class NotionFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): return self.async_create_entry(title=self._username, data=data) - async def async_step_reauth(self, config: dict[str, Any]) -> FlowResult: + async def async_step_reauth(self, config: Mapping[str, Any]) -> FlowResult: """Handle configuration by re-auth.""" self._username = config[CONF_USERNAME] return await self.async_step_reauth_confirm() diff --git a/homeassistant/components/overkiz/config_flow.py b/homeassistant/components/overkiz/config_flow.py index 479e212e317..c70a551f4c7 100644 --- a/homeassistant/components/overkiz/config_flow.py +++ b/homeassistant/components/overkiz/config_flow.py @@ -1,6 +1,7 @@ """Config flow for Overkiz (by Somfy) integration.""" from __future__ import annotations +from collections.abc import Mapping from typing import Any, cast from aiohttp import ClientError @@ -154,9 +155,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): return await self.async_step_user() - 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 reauth.""" self._config_entry = cast( ConfigEntry, @@ -170,4 +169,4 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): self._default_user = self._config_entry.data[CONF_USERNAME] self._default_hub = self._config_entry.data[CONF_HUB] - return await self.async_step_user(user_input) + return await self.async_step_user(dict(data))