Standardize import step variable name (part 1) (#124674)

This commit is contained in:
epenet 2024-08-27 10:34:47 +02:00 committed by GitHub
parent 715f4bd2c3
commit 831a1d7ad1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
23 changed files with 81 additions and 83 deletions

View File

@ -37,12 +37,12 @@ class DemoConfigFlow(ConfigFlow, domain=DOMAIN):
"""Get the options flow for this handler.""" """Get the options flow for this handler."""
return OptionsFlowHandler(config_entry) 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.""" """Set the config entry up from yaml."""
if self._async_current_entries(): if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed") 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): class OptionsFlowHandler(OptionsFlow):

View File

@ -43,13 +43,13 @@ class DownloaderConfigFlow(ConfigFlow, domain=DOMAIN):
errors=errors, 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.""" """Handle a flow initiated by configuration file."""
try: try:
await self._validate_input(user_input) await self._validate_input(import_data)
except DirectoryDoesNotExist: except DirectoryDoesNotExist:
return self.async_abort(reason="directory_does_not_exist") 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: async def _validate_input(self, user_input: dict[str, Any]) -> None:
"""Validate the user input if the directory exists.""" """Validate the user input if the directory exists."""

View File

@ -26,9 +26,9 @@ class DynaliteFlowHandler(ConfigFlow, domain=DOMAIN):
"""Initialize the Dynalite flow.""" """Initialize the Dynalite flow."""
self.host = None 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.""" """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 # Raise an issue that this is deprecated and has been imported
async_create_issue( async_create_issue(
self.hass, 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 # Check if host already exists
for entry in self._async_current_entries(): for entry in self._async_current_entries():
if entry.data[CONF_HOST] == host: if entry.data[CONF_HOST] == host:
self.hass.config_entries.async_update_entry( self.hass.config_entries.async_update_entry(
entry, data=dict(import_info) entry, data=dict(import_data)
) )
return self.async_abort(reason="already_configured") return self.async_abort(reason="already_configured")
# New entry # New entry
return await self._try_create(import_info) return await self._try_create(import_data)
async def async_step_user( async def async_step_user(
self, user_input: dict[str, Any] | None = None self, user_input: dict[str, Any] | None = None

View File

@ -335,10 +335,10 @@ class Elkm1ConfigFlow(ConfigFlow, domain=DOMAIN):
errors=errors, 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.""" """Handle import."""
_LOGGER.debug("Elk is importing from yaml") _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): if self._url_already_configured(url):
return self.async_abort(reason="address_already_configured") return self.async_abort(reason="address_already_configured")
@ -357,7 +357,7 @@ class Elkm1ConfigFlow(ConfigFlow, domain=DOMAIN):
) )
self._abort_if_unique_id_configured() 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: if errors:
return self.async_abort(reason=list(errors.values())[0]) return self.async_abort(reason=list(errors.values())[0])
assert result is not None assert result is not None

View File

@ -152,20 +152,20 @@ class Enigma2ConfigFlowHandler(ConfigFlow, domain=DOMAIN):
) )
return self.async_create_entry(data=user_input, title=user_input[CONF_HOST]) 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.""" """Handle the import step."""
if CONF_PORT not in user_input: if CONF_PORT not in import_data:
user_input[CONF_PORT] = DEFAULT_PORT import_data[CONF_PORT] = DEFAULT_PORT
if CONF_SSL not in user_input: if CONF_SSL not in import_data:
user_input[CONF_SSL] = DEFAULT_SSL import_data[CONF_SSL] = DEFAULT_SSL
user_input[CONF_VERIFY_SSL] = DEFAULT_VERIFY_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 = { 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( async_create_issue(
self.hass, self.hass,
DOMAIN, DOMAIN,

View File

@ -115,10 +115,10 @@ class FeedReaderConfigFlow(ConfigFlow, domain=DOMAIN):
options={CONF_MAX_ENTRIES: self._max_entries or DEFAULT_MAX_ENTRIES}, 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.""" """Handle an import flow."""
self._max_entries = user_input[CONF_MAX_ENTRIES] self._max_entries = import_data[CONF_MAX_ENTRIES]
return await self.async_step_user({CONF_URL: user_input[CONF_URL]}) return await self.async_step_user({CONF_URL: import_data[CONF_URL]})
async def async_step_reconfigure( async def async_step_reconfigure(
self, _: dict[str, Any] | None = None self, _: dict[str, Any] | None = None

View File

@ -93,6 +93,6 @@ class OAuth2FlowHandler(
self._abort_if_unique_id_configured() self._abort_if_unique_id_configured()
return self.async_create_entry(title=profile.display_name, data=data) 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.""" """Handle import from YAML."""
return await self.async_oauth_create_entry(data) return await self.async_oauth_create_entry(import_data)

View File

@ -124,12 +124,12 @@ class GeniusHubConfigFlow(ConfigFlow, domain=DOMAIN):
step_id="cloud_api", errors=errors, data_schema=CLOUD_API_SCHEMA 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.""" """Import the yaml config."""
if CONF_HOST in user_input: if CONF_HOST in import_data:
result = await self.async_step_local_api(user_input) result = await self.async_step_local_api(import_data)
else: 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: if result["type"] is FlowResultType.FORM:
assert result["errors"] assert result["errors"]
return self.async_abort(reason=result["errors"]["base"]) return self.async_abort(reason=result["errors"]["base"])

View File

@ -94,7 +94,7 @@ class OAuth2FlowHandler(
"prompt": "consent", "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.""" """Import existing auth into a new config entry."""
if self._async_current_entries(): if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed") return self.async_abort(reason="single_instance_allowed")
@ -103,8 +103,8 @@ class OAuth2FlowHandler(
) )
assert len(implementations) == 1 assert len(implementations) == 1
self.flow_impl = list(implementations.values())[0] self.flow_impl = list(implementations.values())[0]
self.external_data = info self.external_data = import_data
return await super().async_step_creation(info) return await super().async_step_creation(import_data)
async def async_step_auth( async def async_step_auth(
self, user_input: dict[str, Any] | None = None self, user_input: dict[str, Any] | None = None

View File

@ -311,12 +311,12 @@ class HomeKitConfigFlow(ConfigFlow, domain=DOMAIN):
title=f"{name}:{entry_data[CONF_PORT]}", data=entry_data 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.""" """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_abort(reason="port_name_in_use")
return self.async_create_entry( 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 @callback

View File

@ -83,11 +83,11 @@ class HomematicipCloudFlowHandler(ConfigFlow, domain=DOMAIN):
return self.async_show_form(step_id="link", errors=errors) 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.""" """Import a new access point as a config entry."""
hapid = import_info[HMIPC_HAPID].replace("-", "").upper() hapid = import_data[HMIPC_HAPID].replace("-", "").upper()
authtoken = import_info[HMIPC_AUTHTOKEN] authtoken = import_data[HMIPC_AUTHTOKEN]
name = import_info[HMIPC_NAME] name = import_data[HMIPC_NAME]
await self.async_set_unique_id(hapid) await self.async_set_unique_id(hapid)
self._abort_if_unique_id_configured() self._abort_if_unique_id_configured()

View File

@ -258,7 +258,7 @@ class HueFlowHandler(ConfigFlow, domain=DOMAIN):
await self._async_handle_discovery_without_unique_id() await self._async_handle_discovery_without_unique_id()
return await self.async_step_link() 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. """Import a new bridge as a config entry.
This flow is triggered by `async_setup` for both configured and 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`. This flow is also triggered by `async_step_discovery`.
""" """
# Check if host exists, abort if so. # 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: if bridge is None:
return self.async_abort(reason="cannot_connect") return self.async_abort(reason="cannot_connect")
self.bridge = bridge self.bridge = bridge

View File

@ -34,12 +34,12 @@ class KitchenSinkConfigFlow(ConfigFlow, domain=DOMAIN):
"""Get the options flow for this handler.""" """Get the options flow for this handler."""
return OptionsFlowHandler(config_entry) 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.""" """Set the config entry up from yaml."""
if self._async_current_entries(): if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed") 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): async def async_step_reauth(self, data):
"""Reauth step.""" """Reauth step."""

View File

@ -68,11 +68,11 @@ class LGNetCast(config_entries.ConfigFlow, domain=DOMAIN):
errors=errors, 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.""" """Import configuration from yaml."""
self.device_config = { self.device_config = {
CONF_HOST: config[CONF_HOST], CONF_HOST: import_data[CONF_HOST],
CONF_NAME: config[CONF_NAME], CONF_NAME: import_data[CONF_NAME],
} }
def _create_issue(): def _create_issue():
@ -92,7 +92,7 @@ class LGNetCast(config_entries.ConfigFlow, domain=DOMAIN):
) )
try: try:
result: ConfigFlowResult = await self.async_step_authorize(config) result: ConfigFlowResult = await self.async_step_authorize(import_data)
except AbortFlow as err: except AbortFlow as err:
if err.reason != "already_configured": if err.reason != "already_configured":
async_create_issue( async_create_issue(

View File

@ -19,7 +19,6 @@ from homeassistant.helpers.selector import (
TextSelectorConfig, TextSelectorConfig,
TextSelectorType, TextSelectorType,
) )
from homeassistant.helpers.typing import ConfigType
from homeassistant.util import slugify from homeassistant.util import slugify
from .const import CONF_BASE_URL, DEFAULT_URL, DOMAIN, LOGGER 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) 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.""" """Import a config entry from configuration.yaml."""
errors: dict[str, str] | None = None errors: dict[str, str] | None = None
LOGGER.debug("Importing Mastodon from configuration.yaml") LOGGER.debug("Importing Mastodon from configuration.yaml")
base_url = str(import_config.get(CONF_BASE_URL, DEFAULT_URL)) base_url = str(import_data.get(CONF_BASE_URL, DEFAULT_URL))
client_id = str(import_config.get(CONF_CLIENT_ID)) client_id = str(import_data.get(CONF_CLIENT_ID))
client_secret = str(import_config.get(CONF_CLIENT_SECRET)) client_secret = str(import_data.get(CONF_CLIENT_SECRET))
access_token = str(import_config.get(CONF_ACCESS_TOKEN)) access_token = str(import_data.get(CONF_ACCESS_TOKEN))
name = import_config.get(CONF_NAME, None) name = import_data.get(CONF_NAME)
instance, account, errors = await self.hass.async_add_executor_job( instance, account, errors = await self.hass.async_add_executor_job(
self.check_connection, self.check_connection,

View File

@ -82,15 +82,15 @@ class TOTPConfigFlow(ConfigFlow, domain=DOMAIN):
errors=errors, 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.""" """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() self._abort_if_unique_id_configured()
return self.async_create_entry( return self.async_create_entry(
title=import_info.get(CONF_NAME, DEFAULT_NAME), title=import_data.get(CONF_NAME, DEFAULT_NAME),
data=import_info, data=import_data,
) )
async def async_step_confirm( async def async_step_confirm(

View File

@ -133,16 +133,16 @@ class PyLoadConfigFlow(ConfigFlow, domain=DOMAIN):
errors=errors, 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.""" """Import config from yaml."""
config = { config = {
CONF_NAME: import_info.get(CONF_NAME), CONF_NAME: import_data.get(CONF_NAME),
CONF_HOST: import_info.get(CONF_HOST, DEFAULT_HOST), CONF_HOST: import_data.get(CONF_HOST, DEFAULT_HOST),
CONF_PASSWORD: import_info.get(CONF_PASSWORD, ""), CONF_PASSWORD: import_data.get(CONF_PASSWORD, ""),
CONF_PORT: import_info.get(CONF_PORT, DEFAULT_PORT), CONF_PORT: import_data.get(CONF_PORT, DEFAULT_PORT),
CONF_SSL: import_info.get(CONF_SSL, False), CONF_SSL: import_data.get(CONF_SSL, False),
CONF_USERNAME: import_info.get(CONF_USERNAME, ""), CONF_USERNAME: import_data.get(CONF_USERNAME, ""),
CONF_VERIFY_SSL: False, CONF_VERIFY_SSL: False,
} }

View File

@ -60,11 +60,11 @@ class RovaConfigFlow(ConfigFlow, domain=DOMAIN):
errors=errors, 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.""" """Import the yaml config."""
zip_code = user_input[CONF_ZIP_CODE] zip_code = import_data[CONF_ZIP_CODE]
number = user_input[CONF_HOUSE_NUMBER] number = import_data[CONF_HOUSE_NUMBER]
suffix = user_input[CONF_HOUSE_NUMBER_SUFFIX] suffix = import_data[CONF_HOUSE_NUMBER_SUFFIX]
await self.async_set_unique_id(f"{zip_code}{number}{suffix}".strip()) await self.async_set_unique_id(f"{zip_code}{number}{suffix}".strip())
self._abort_if_unique_id_configured() self._abort_if_unique_id_configured()

View File

@ -101,14 +101,14 @@ class SolarLogConfigFlow(ConfigFlow, domain=DOMAIN):
errors=self._errors, 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.""" """Import a config entry."""
user_input = { user_input = {
CONF_HOST: DEFAULT_HOST, CONF_HOST: DEFAULT_HOST,
CONF_NAME: DEFAULT_NAME, CONF_NAME: DEFAULT_NAME,
"extended_data": False, "extended_data": False,
**user_input, **import_data,
} }
user_input[CONF_HOST] = self._parse_url(user_input[CONF_HOST]) user_input[CONF_HOST] = self._parse_url(user_input[CONF_HOST])

View File

@ -23,6 +23,6 @@ class SunConfigFlow(ConfigFlow, domain=DOMAIN):
return self.async_show_form(step_id="user") 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.""" """Handle import from configuration.yaml."""
return await self.async_step_user(user_input) return await self.async_step_user(import_data)

View File

@ -15,7 +15,6 @@ from homeassistant.const import (
) )
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.exceptions import HomeAssistantError from homeassistant.exceptions import HomeAssistantError
from homeassistant.helpers.typing import ConfigType
from .const import _LOGGER, DOMAIN, VENSTAR_TIMEOUT from .const import _LOGGER, DOMAIN, VENSTAR_TIMEOUT
@ -85,7 +84,7 @@ class VenstarConfigFlow(ConfigFlow, domain=DOMAIN):
errors=errors, 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.""" """Import entry from configuration.yaml."""
self._async_abort_entries_match({CONF_HOST: import_data[CONF_HOST]}) self._async_abort_entries_match({CONF_HOST: import_data[CONF_HOST]})
return await self.async_step_user( return await self.async_step_user(

View File

@ -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.""" """Handle a flow initialized by import."""
# If there are entities with the legacy unique_id, then this imported config # 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( return await self.async_step_finish(
{ {
**config, **import_data,
CONF_SOURCE: SOURCE_IMPORT, CONF_SOURCE: SOURCE_IMPORT,
CONF_LEGACY_UNIQUE_ID: use_legacy_unique_id, CONF_LEGACY_UNIQUE_ID: use_legacy_unique_id,
} }

View File

@ -366,7 +366,7 @@ class ZWaveJSConfigFlow(BaseZwaveJSFlow, ConfigFlow, domain=DOMAIN):
"""Return the options flow.""" """Return the options flow."""
return OptionsFlowHandler(config_entry) 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. """Handle imported data.
This step will be used when importing 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. # Note that the data comes from the zwave integration.
# So we don't use our constants here. # So we don't use our constants here.
self.s0_legacy_key = data.get("network_key") self.s0_legacy_key = import_data.get("network_key")
self.usb_path = data.get("usb_path") self.usb_path = import_data.get("usb_path")
return await self.async_step_user() return await self.async_step_user()
async def async_step_user( async def async_step_user(