diff --git a/homeassistant/components/canary/config_flow.py b/homeassistant/components/canary/config_flow.py index 6ae7632a7e2..5af7142af8f 100644 --- a/homeassistant/components/canary/config_flow.py +++ b/homeassistant/components/canary/config_flow.py @@ -54,11 +54,9 @@ class CanaryConfigFlow(ConfigFlow, domain=DOMAIN): """Get the options flow for this handler.""" return CanaryOptionsFlowHandler(config_entry) - async def async_step_import( - self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Handle a flow initiated by configuration file.""" - return await self.async_step_user(user_input) + return await self.async_step_user(import_data) async def async_step_user( self, user_input: dict[str, Any] | None = None diff --git a/homeassistant/components/file/config_flow.py b/homeassistant/components/file/config_flow.py index 8cb58ec1f47..d74e36ce935 100644 --- a/homeassistant/components/file/config_flow.py +++ b/homeassistant/components/file/config_flow.py @@ -129,11 +129,8 @@ class FileConfigFlowHandler(ConfigFlow, domain=DOMAIN): """Handle file sensor config flow.""" return await self._async_handle_step(Platform.SENSOR.value, user_input) - async def async_step_import( - self, import_data: dict[str, Any] | None = None - ) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import `file`` config from configuration.yaml.""" - assert import_data is not None self._async_abort_entries_match(import_data) platform = import_data[CONF_PLATFORM] name: str = import_data.get(CONF_NAME, DEFAULT_NAME) diff --git a/homeassistant/components/hive/config_flow.py b/homeassistant/components/hive/config_flow.py index f8cb089834a..d6be2d1efab 100644 --- a/homeassistant/components/hive/config_flow.py +++ b/homeassistant/components/hive/config_flow.py @@ -163,11 +163,9 @@ class HiveFlowHandler(ConfigFlow, domain=DOMAIN): } return await self.async_step_user(data) - async def async_step_import( - self, user_input: dict[str, Any] | None = None - ) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import user.""" - return await self.async_step_user(user_input) + return await self.async_step_user(import_data) @staticmethod @callback diff --git a/homeassistant/components/jewish_calendar/config_flow.py b/homeassistant/components/jewish_calendar/config_flow.py index 8f04d73915f..518db38b3bb 100644 --- a/homeassistant/components/jewish_calendar/config_flow.py +++ b/homeassistant/components/jewish_calendar/config_flow.py @@ -30,7 +30,6 @@ from homeassistant.helpers.selector import ( SelectSelector, SelectSelectorConfig, ) -from homeassistant.helpers.typing import ConfigType from .const import ( CONF_CANDLE_LIGHT_MINUTES, @@ -125,11 +124,9 @@ class JewishCalendarConfigFlow(ConfigFlow, domain=DOMAIN): ), ) - async def async_step_import( - self, import_config: ConfigType | None - ) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import a config entry from configuration.yaml.""" - return await self.async_step_user(import_config) + return await self.async_step_user(import_data) class JewishCalendarOptionsFlowHandler(OptionsFlowWithConfigEntry): diff --git a/homeassistant/components/media_extractor/config_flow.py b/homeassistant/components/media_extractor/config_flow.py index 4343d0551e0..b91942d7b13 100644 --- a/homeassistant/components/media_extractor/config_flow.py +++ b/homeassistant/components/media_extractor/config_flow.py @@ -25,8 +25,6 @@ class MediaExtractorConfigFlow(ConfigFlow, domain=DOMAIN): return self.async_show_form(step_id="user", data_schema=vol.Schema({})) - async def async_step_import( - self, import_config: dict[str, Any] - ) -> ConfigFlowResult: + async def async_step_import(self, import_data: None) -> ConfigFlowResult: """Handle import.""" return self.async_create_entry(title="Media extractor", data={}) diff --git a/homeassistant/components/thread/config_flow.py b/homeassistant/components/thread/config_flow.py index b4b6eac0fc8..568b76d4999 100644 --- a/homeassistant/components/thread/config_flow.py +++ b/homeassistant/components/thread/config_flow.py @@ -15,9 +15,7 @@ class ThreadConfigFlow(ConfigFlow, domain=DOMAIN): VERSION = 1 - async def async_step_import( - self, import_data: dict[str, str] | None = None - ) -> ConfigFlowResult: + async def async_step_import(self, import_data: None) -> ConfigFlowResult: """Set up by import from async_setup.""" await self._async_handle_discovery_without_unique_id() return self.async_create_entry(title="Thread", data={}) diff --git a/homeassistant/components/toon/config_flow.py b/homeassistant/components/toon/config_flow.py index 40e83c3c9be..af9f7b06850 100644 --- a/homeassistant/components/toon/config_flow.py +++ b/homeassistant/components/toon/config_flow.py @@ -48,7 +48,7 @@ class ToonFlowHandler(AbstractOAuth2FlowHandler, domain=DOMAIN): return await self.async_step_agreement() async def async_step_import( - self, config: dict[str, Any] | None = None + self, import_data: dict[str, Any] | None ) -> ConfigFlowResult: """Start a configuration flow based on imported data. @@ -57,8 +57,8 @@ class ToonFlowHandler(AbstractOAuth2FlowHandler, domain=DOMAIN): the version 1 schema. """ - if config is not None and CONF_MIGRATE in config: - self.context.update({CONF_MIGRATE: config[CONF_MIGRATE]}) + if import_data is not None and CONF_MIGRATE in import_data: + self.context.update({CONF_MIGRATE: import_data[CONF_MIGRATE]}) else: await self._async_handle_discovery_without_unique_id()