diff --git a/homeassistant/components/demo/config_flow.py b/homeassistant/components/demo/config_flow.py index 468d9cb042b..c866873732c 100644 --- a/homeassistant/components/demo/config_flow.py +++ b/homeassistant/components/demo/config_flow.py @@ -37,12 +37,12 @@ class DemoConfigFlow(ConfigFlow, domain=DOMAIN): """Get the options flow for this handler.""" return OptionsFlowHandler(config_entry) - async def async_step_import(self, import_info: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Set the config entry up from yaml.""" if self._async_current_entries(): return self.async_abort(reason="single_instance_allowed") - return self.async_create_entry(title="Demo", data=import_info) + return self.async_create_entry(title="Demo", data=import_data) class OptionsFlowHandler(OptionsFlow): diff --git a/homeassistant/components/downloader/config_flow.py b/homeassistant/components/downloader/config_flow.py index e7191e055a6..61a7ba8fe52 100644 --- a/homeassistant/components/downloader/config_flow.py +++ b/homeassistant/components/downloader/config_flow.py @@ -43,13 +43,13 @@ class DownloaderConfigFlow(ConfigFlow, domain=DOMAIN): errors=errors, ) - async def async_step_import(self, user_input: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Handle a flow initiated by configuration file.""" try: - await self._validate_input(user_input) + await self._validate_input(import_data) except DirectoryDoesNotExist: return self.async_abort(reason="directory_does_not_exist") - return self.async_create_entry(title=DEFAULT_NAME, data=user_input) + return self.async_create_entry(title=DEFAULT_NAME, data=import_data) async def _validate_input(self, user_input: dict[str, Any]) -> None: """Validate the user input if the directory exists.""" diff --git a/homeassistant/components/dynalite/config_flow.py b/homeassistant/components/dynalite/config_flow.py index 3ae4828b668..928f7043a49 100644 --- a/homeassistant/components/dynalite/config_flow.py +++ b/homeassistant/components/dynalite/config_flow.py @@ -26,9 +26,9 @@ class DynaliteFlowHandler(ConfigFlow, domain=DOMAIN): """Initialize the Dynalite flow.""" self.host = None - async def async_step_import(self, import_info: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import a new bridge as a config entry.""" - LOGGER.debug("Starting async_step_import (deprecated) - %s", import_info) + LOGGER.debug("Starting async_step_import (deprecated) - %s", import_data) # Raise an issue that this is deprecated and has been imported async_create_issue( self.hass, @@ -46,17 +46,17 @@ class DynaliteFlowHandler(ConfigFlow, domain=DOMAIN): }, ) - host = import_info[CONF_HOST] + host = import_data[CONF_HOST] # Check if host already exists for entry in self._async_current_entries(): if entry.data[CONF_HOST] == host: self.hass.config_entries.async_update_entry( - entry, data=dict(import_info) + entry, data=dict(import_data) ) return self.async_abort(reason="already_configured") # New entry - return await self._try_create(import_info) + return await self._try_create(import_data) async def async_step_user( self, user_input: dict[str, Any] | None = None diff --git a/homeassistant/components/elkm1/config_flow.py b/homeassistant/components/elkm1/config_flow.py index 4ab8d1fe181..2f9d3338d76 100644 --- a/homeassistant/components/elkm1/config_flow.py +++ b/homeassistant/components/elkm1/config_flow.py @@ -335,10 +335,10 @@ class Elkm1ConfigFlow(ConfigFlow, domain=DOMAIN): errors=errors, ) - async def async_step_import(self, user_input: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Handle import.""" _LOGGER.debug("Elk is importing from yaml") - url = _make_url_from_data(user_input) + url = _make_url_from_data(import_data) if self._url_already_configured(url): return self.async_abort(reason="address_already_configured") @@ -357,7 +357,7 @@ class Elkm1ConfigFlow(ConfigFlow, domain=DOMAIN): ) self._abort_if_unique_id_configured() - errors, result = await self._async_create_or_error(user_input, True) + errors, result = await self._async_create_or_error(import_data, True) if errors: return self.async_abort(reason=list(errors.values())[0]) assert result is not None diff --git a/homeassistant/components/enigma2/config_flow.py b/homeassistant/components/enigma2/config_flow.py index 71c5830d550..55c0f6fc6ae 100644 --- a/homeassistant/components/enigma2/config_flow.py +++ b/homeassistant/components/enigma2/config_flow.py @@ -152,20 +152,20 @@ class Enigma2ConfigFlowHandler(ConfigFlow, domain=DOMAIN): ) return self.async_create_entry(data=user_input, title=user_input[CONF_HOST]) - async def async_step_import(self, user_input: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Handle the import step.""" - if CONF_PORT not in user_input: - user_input[CONF_PORT] = DEFAULT_PORT - if CONF_SSL not in user_input: - user_input[CONF_SSL] = DEFAULT_SSL - user_input[CONF_VERIFY_SSL] = DEFAULT_VERIFY_SSL + if CONF_PORT not in import_data: + import_data[CONF_PORT] = DEFAULT_PORT + if CONF_SSL not in import_data: + import_data[CONF_SSL] = DEFAULT_SSL + import_data[CONF_VERIFY_SSL] = DEFAULT_VERIFY_SSL - data = {key: user_input[key] for key in user_input if key in self.DATA_KEYS} + data = {key: import_data[key] for key in import_data if key in self.DATA_KEYS} options = { - key: user_input[key] for key in user_input if key in self.OPTIONS_KEYS + key: import_data[key] for key in import_data if key in self.OPTIONS_KEYS } - if errors := await self.validate_user_input(user_input): + if errors := await self.validate_user_input(import_data): async_create_issue( self.hass, DOMAIN, diff --git a/homeassistant/components/feedreader/config_flow.py b/homeassistant/components/feedreader/config_flow.py index d367432ff8c..4553978a47e 100644 --- a/homeassistant/components/feedreader/config_flow.py +++ b/homeassistant/components/feedreader/config_flow.py @@ -115,10 +115,10 @@ class FeedReaderConfigFlow(ConfigFlow, domain=DOMAIN): options={CONF_MAX_ENTRIES: self._max_entries or DEFAULT_MAX_ENTRIES}, ) - async def async_step_import(self, user_input: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Handle an import flow.""" - self._max_entries = user_input[CONF_MAX_ENTRIES] - return await self.async_step_user({CONF_URL: user_input[CONF_URL]}) + self._max_entries = import_data[CONF_MAX_ENTRIES] + return await self.async_step_user({CONF_URL: import_data[CONF_URL]}) async def async_step_reconfigure( self, _: dict[str, Any] | None = None diff --git a/homeassistant/components/fitbit/config_flow.py b/homeassistant/components/fitbit/config_flow.py index 0ae1973b5fb..eff4ba37773 100644 --- a/homeassistant/components/fitbit/config_flow.py +++ b/homeassistant/components/fitbit/config_flow.py @@ -93,6 +93,6 @@ class OAuth2FlowHandler( self._abort_if_unique_id_configured() return self.async_create_entry(title=profile.display_name, data=data) - async def async_step_import(self, data: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Handle import from YAML.""" - return await self.async_oauth_create_entry(data) + return await self.async_oauth_create_entry(import_data) diff --git a/homeassistant/components/geniushub/config_flow.py b/homeassistant/components/geniushub/config_flow.py index 5f026c91ee1..601eac6c2f2 100644 --- a/homeassistant/components/geniushub/config_flow.py +++ b/homeassistant/components/geniushub/config_flow.py @@ -124,12 +124,12 @@ class GeniusHubConfigFlow(ConfigFlow, domain=DOMAIN): step_id="cloud_api", errors=errors, data_schema=CLOUD_API_SCHEMA ) - async def async_step_import(self, user_input: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import the yaml config.""" - if CONF_HOST in user_input: - result = await self.async_step_local_api(user_input) + if CONF_HOST in import_data: + result = await self.async_step_local_api(import_data) else: - result = await self.async_step_cloud_api(user_input) + result = await self.async_step_cloud_api(import_data) if result["type"] is FlowResultType.FORM: assert result["errors"] return self.async_abort(reason=result["errors"]["base"]) diff --git a/homeassistant/components/google/config_flow.py b/homeassistant/components/google/config_flow.py index 6207303c8a6..726af854f75 100644 --- a/homeassistant/components/google/config_flow.py +++ b/homeassistant/components/google/config_flow.py @@ -94,7 +94,7 @@ class OAuth2FlowHandler( "prompt": "consent", } - async def async_step_import(self, info: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import existing auth into a new config entry.""" if self._async_current_entries(): return self.async_abort(reason="single_instance_allowed") @@ -103,8 +103,8 @@ class OAuth2FlowHandler( ) assert len(implementations) == 1 self.flow_impl = list(implementations.values())[0] - self.external_data = info - return await super().async_step_creation(info) + self.external_data = import_data + return await super().async_step_creation(import_data) async def async_step_auth( self, user_input: dict[str, Any] | None = None diff --git a/homeassistant/components/homekit/config_flow.py b/homeassistant/components/homekit/config_flow.py index 78979f73490..f88aa646f04 100644 --- a/homeassistant/components/homekit/config_flow.py +++ b/homeassistant/components/homekit/config_flow.py @@ -311,12 +311,12 @@ class HomeKitConfigFlow(ConfigFlow, domain=DOMAIN): title=f"{name}:{entry_data[CONF_PORT]}", data=entry_data ) - async def async_step_import(self, user_input: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Handle import from yaml.""" - if not self._async_is_unique_name_port(user_input): + if not self._async_is_unique_name_port(import_data): return self.async_abort(reason="port_name_in_use") return self.async_create_entry( - title=f"{user_input[CONF_NAME]}:{user_input[CONF_PORT]}", data=user_input + title=f"{import_data[CONF_NAME]}:{import_data[CONF_PORT]}", data=import_data ) @callback diff --git a/homeassistant/components/homematicip_cloud/config_flow.py b/homeassistant/components/homematicip_cloud/config_flow.py index c2277e16c79..a8b17a80aff 100644 --- a/homeassistant/components/homematicip_cloud/config_flow.py +++ b/homeassistant/components/homematicip_cloud/config_flow.py @@ -83,11 +83,11 @@ class HomematicipCloudFlowHandler(ConfigFlow, domain=DOMAIN): return self.async_show_form(step_id="link", errors=errors) - async def async_step_import(self, import_info: dict[str, str]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, str]) -> ConfigFlowResult: """Import a new access point as a config entry.""" - hapid = import_info[HMIPC_HAPID].replace("-", "").upper() - authtoken = import_info[HMIPC_AUTHTOKEN] - name = import_info[HMIPC_NAME] + hapid = import_data[HMIPC_HAPID].replace("-", "").upper() + authtoken = import_data[HMIPC_AUTHTOKEN] + name = import_data[HMIPC_NAME] await self.async_set_unique_id(hapid) self._abort_if_unique_id_configured() diff --git a/homeassistant/components/hue/config_flow.py b/homeassistant/components/hue/config_flow.py index fb32f568ee1..e73ae8fe11d 100644 --- a/homeassistant/components/hue/config_flow.py +++ b/homeassistant/components/hue/config_flow.py @@ -258,7 +258,7 @@ class HueFlowHandler(ConfigFlow, domain=DOMAIN): await self._async_handle_discovery_without_unique_id() return await self.async_step_link() - async def async_step_import(self, import_info: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import a new bridge as a config entry. This flow is triggered by `async_setup` for both configured and @@ -268,9 +268,9 @@ class HueFlowHandler(ConfigFlow, domain=DOMAIN): This flow is also triggered by `async_step_discovery`. """ # Check if host exists, abort if so. - self._async_abort_entries_match({"host": import_info["host"]}) + self._async_abort_entries_match({"host": import_data["host"]}) - bridge = await self._get_bridge(import_info["host"]) + bridge = await self._get_bridge(import_data["host"]) if bridge is None: return self.async_abort(reason="cannot_connect") self.bridge = bridge diff --git a/homeassistant/components/kitchen_sink/config_flow.py b/homeassistant/components/kitchen_sink/config_flow.py index c561ca29b8a..2e05db71b89 100644 --- a/homeassistant/components/kitchen_sink/config_flow.py +++ b/homeassistant/components/kitchen_sink/config_flow.py @@ -34,12 +34,12 @@ class KitchenSinkConfigFlow(ConfigFlow, domain=DOMAIN): """Get the options flow for this handler.""" return OptionsFlowHandler(config_entry) - async def async_step_import(self, import_info: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Set the config entry up from yaml.""" if self._async_current_entries(): return self.async_abort(reason="single_instance_allowed") - return self.async_create_entry(title="Kitchen Sink", data=import_info) + return self.async_create_entry(title="Kitchen Sink", data=import_data) async def async_step_reauth(self, data): """Reauth step.""" diff --git a/homeassistant/components/lg_netcast/config_flow.py b/homeassistant/components/lg_netcast/config_flow.py index c4e6c75edea..4b1780d41ae 100644 --- a/homeassistant/components/lg_netcast/config_flow.py +++ b/homeassistant/components/lg_netcast/config_flow.py @@ -68,11 +68,11 @@ class LGNetCast(config_entries.ConfigFlow, domain=DOMAIN): errors=errors, ) - async def async_step_import(self, config: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import configuration from yaml.""" self.device_config = { - CONF_HOST: config[CONF_HOST], - CONF_NAME: config[CONF_NAME], + CONF_HOST: import_data[CONF_HOST], + CONF_NAME: import_data[CONF_NAME], } def _create_issue(): @@ -92,7 +92,7 @@ class LGNetCast(config_entries.ConfigFlow, domain=DOMAIN): ) try: - result: ConfigFlowResult = await self.async_step_authorize(config) + result: ConfigFlowResult = await self.async_step_authorize(import_data) except AbortFlow as err: if err.reason != "already_configured": async_create_issue( diff --git a/homeassistant/components/mastodon/config_flow.py b/homeassistant/components/mastodon/config_flow.py index 4e856275736..5c9419cd12d 100644 --- a/homeassistant/components/mastodon/config_flow.py +++ b/homeassistant/components/mastodon/config_flow.py @@ -19,7 +19,6 @@ from homeassistant.helpers.selector import ( TextSelectorConfig, TextSelectorType, ) -from homeassistant.helpers.typing import ConfigType from homeassistant.util import slugify from .const import CONF_BASE_URL, DEFAULT_URL, DOMAIN, LOGGER @@ -126,17 +125,17 @@ class MastodonConfigFlow(ConfigFlow, domain=DOMAIN): return self.show_user_form(user_input, errors) - async def async_step_import(self, import_config: ConfigType) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import a config entry from configuration.yaml.""" errors: dict[str, str] | None = None LOGGER.debug("Importing Mastodon from configuration.yaml") - base_url = str(import_config.get(CONF_BASE_URL, DEFAULT_URL)) - client_id = str(import_config.get(CONF_CLIENT_ID)) - client_secret = str(import_config.get(CONF_CLIENT_SECRET)) - access_token = str(import_config.get(CONF_ACCESS_TOKEN)) - name = import_config.get(CONF_NAME, None) + base_url = str(import_data.get(CONF_BASE_URL, DEFAULT_URL)) + client_id = str(import_data.get(CONF_CLIENT_ID)) + client_secret = str(import_data.get(CONF_CLIENT_SECRET)) + access_token = str(import_data.get(CONF_ACCESS_TOKEN)) + name = import_data.get(CONF_NAME) instance, account, errors = await self.hass.async_add_executor_job( self.check_connection, diff --git a/homeassistant/components/otp/config_flow.py b/homeassistant/components/otp/config_flow.py index 6aa4532683a..33f63a04d68 100644 --- a/homeassistant/components/otp/config_flow.py +++ b/homeassistant/components/otp/config_flow.py @@ -82,15 +82,15 @@ class TOTPConfigFlow(ConfigFlow, domain=DOMAIN): errors=errors, ) - async def async_step_import(self, import_info: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import config from yaml.""" - await self.async_set_unique_id(import_info[CONF_TOKEN]) + await self.async_set_unique_id(import_data[CONF_TOKEN]) self._abort_if_unique_id_configured() return self.async_create_entry( - title=import_info.get(CONF_NAME, DEFAULT_NAME), - data=import_info, + title=import_data.get(CONF_NAME, DEFAULT_NAME), + data=import_data, ) async def async_step_confirm( diff --git a/homeassistant/components/pyload/config_flow.py b/homeassistant/components/pyload/config_flow.py index 2f4f9519d30..79b90ff917d 100644 --- a/homeassistant/components/pyload/config_flow.py +++ b/homeassistant/components/pyload/config_flow.py @@ -133,16 +133,16 @@ class PyLoadConfigFlow(ConfigFlow, domain=DOMAIN): errors=errors, ) - async def async_step_import(self, import_info: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import config from yaml.""" config = { - CONF_NAME: import_info.get(CONF_NAME), - CONF_HOST: import_info.get(CONF_HOST, DEFAULT_HOST), - CONF_PASSWORD: import_info.get(CONF_PASSWORD, ""), - CONF_PORT: import_info.get(CONF_PORT, DEFAULT_PORT), - CONF_SSL: import_info.get(CONF_SSL, False), - CONF_USERNAME: import_info.get(CONF_USERNAME, ""), + CONF_NAME: import_data.get(CONF_NAME), + CONF_HOST: import_data.get(CONF_HOST, DEFAULT_HOST), + CONF_PASSWORD: import_data.get(CONF_PASSWORD, ""), + CONF_PORT: import_data.get(CONF_PORT, DEFAULT_PORT), + CONF_SSL: import_data.get(CONF_SSL, False), + CONF_USERNAME: import_data.get(CONF_USERNAME, ""), CONF_VERIFY_SSL: False, } diff --git a/homeassistant/components/rova/config_flow.py b/homeassistant/components/rova/config_flow.py index e5e3a31b8af..a28e6202466 100644 --- a/homeassistant/components/rova/config_flow.py +++ b/homeassistant/components/rova/config_flow.py @@ -60,11 +60,11 @@ class RovaConfigFlow(ConfigFlow, domain=DOMAIN): errors=errors, ) - async def async_step_import(self, user_input: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import the yaml config.""" - zip_code = user_input[CONF_ZIP_CODE] - number = user_input[CONF_HOUSE_NUMBER] - suffix = user_input[CONF_HOUSE_NUMBER_SUFFIX] + zip_code = import_data[CONF_ZIP_CODE] + number = import_data[CONF_HOUSE_NUMBER] + suffix = import_data[CONF_HOUSE_NUMBER_SUFFIX] await self.async_set_unique_id(f"{zip_code}{number}{suffix}".strip()) self._abort_if_unique_id_configured() diff --git a/homeassistant/components/solarlog/config_flow.py b/homeassistant/components/solarlog/config_flow.py index 7c8401be2b8..7824c98cf5d 100644 --- a/homeassistant/components/solarlog/config_flow.py +++ b/homeassistant/components/solarlog/config_flow.py @@ -101,14 +101,14 @@ class SolarLogConfigFlow(ConfigFlow, domain=DOMAIN): errors=self._errors, ) - async def async_step_import(self, user_input: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import a config entry.""" user_input = { CONF_HOST: DEFAULT_HOST, CONF_NAME: DEFAULT_NAME, "extended_data": False, - **user_input, + **import_data, } user_input[CONF_HOST] = self._parse_url(user_input[CONF_HOST]) diff --git a/homeassistant/components/sun/config_flow.py b/homeassistant/components/sun/config_flow.py index 30b64c60b9f..16c465be8ad 100644 --- a/homeassistant/components/sun/config_flow.py +++ b/homeassistant/components/sun/config_flow.py @@ -23,6 +23,6 @@ class SunConfigFlow(ConfigFlow, domain=DOMAIN): return self.async_show_form(step_id="user") - async def async_step_import(self, user_input: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Handle import from configuration.yaml.""" - return await self.async_step_user(user_input) + return await self.async_step_user(import_data) diff --git a/homeassistant/components/venstar/config_flow.py b/homeassistant/components/venstar/config_flow.py index 289f7936676..929f5718c19 100644 --- a/homeassistant/components/venstar/config_flow.py +++ b/homeassistant/components/venstar/config_flow.py @@ -15,7 +15,6 @@ from homeassistant.const import ( ) from homeassistant.core import HomeAssistant from homeassistant.exceptions import HomeAssistantError -from homeassistant.helpers.typing import ConfigType from .const import _LOGGER, DOMAIN, VENSTAR_TIMEOUT @@ -85,7 +84,7 @@ class VenstarConfigFlow(ConfigFlow, domain=DOMAIN): errors=errors, ) - async def async_step_import(self, import_data: ConfigType) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Import entry from configuration.yaml.""" self._async_abort_entries_match({CONF_HOST: import_data[CONF_HOST]}) return await self.async_step_user( diff --git a/homeassistant/components/vera/config_flow.py b/homeassistant/components/vera/config_flow.py index 181849f46a1..08e7640773b 100644 --- a/homeassistant/components/vera/config_flow.py +++ b/homeassistant/components/vera/config_flow.py @@ -127,7 +127,7 @@ class VeraFlowHandler(ConfigFlow, domain=DOMAIN): ), ) - async def async_step_import(self, config: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Handle a flow initialized by import.""" # If there are entities with the legacy unique_id, then this imported config @@ -146,7 +146,7 @@ class VeraFlowHandler(ConfigFlow, domain=DOMAIN): return await self.async_step_finish( { - **config, + **import_data, CONF_SOURCE: SOURCE_IMPORT, CONF_LEGACY_UNIQUE_ID: use_legacy_unique_id, } diff --git a/homeassistant/components/zwave_js/config_flow.py b/homeassistant/components/zwave_js/config_flow.py index e73fa9fc3a7..6d9f88d93f1 100644 --- a/homeassistant/components/zwave_js/config_flow.py +++ b/homeassistant/components/zwave_js/config_flow.py @@ -366,7 +366,7 @@ class ZWaveJSConfigFlow(BaseZwaveJSFlow, ConfigFlow, domain=DOMAIN): """Return the options flow.""" return OptionsFlowHandler(config_entry) - async def async_step_import(self, data: dict[str, Any]) -> ConfigFlowResult: + async def async_step_import(self, import_data: dict[str, Any]) -> ConfigFlowResult: """Handle imported data. This step will be used when importing data @@ -374,8 +374,8 @@ class ZWaveJSConfigFlow(BaseZwaveJSFlow, ConfigFlow, domain=DOMAIN): """ # Note that the data comes from the zwave integration. # So we don't use our constants here. - self.s0_legacy_key = data.get("network_key") - self.usb_path = data.get("usb_path") + self.s0_legacy_key = import_data.get("network_key") + self.usb_path = import_data.get("usb_path") return await self.async_step_user() async def async_step_user(