1 """Config flow for EDL21 integration."""
3 import voluptuous
as vol
7 from .const
import CONF_SERIAL_PORT, DEFAULT_TITLE, DOMAIN
9 DATA_SCHEMA = vol.Schema(
11 vol.Required(CONF_SERIAL_PORT): str,
17 """EDL21 config flow."""
22 self, user_input: dict[str, str] |
None =
None
23 ) -> ConfigFlowResult:
24 """Handle the user setup step."""
25 if user_input
is not None:
27 {CONF_SERIAL_PORT: user_input[CONF_SERIAL_PORT]}
ConfigFlowResult async_step_user(self, dict[str, str]|None user_input=None)
ConfigFlowResult async_create_entry(self, *str title, Mapping[str, Any] data, str|None description=None, Mapping[str, str]|None description_placeholders=None, Mapping[str, Any]|None options=None)
None _async_abort_entries_match(self, dict[str, Any]|None match_dict=None)
ConfigFlowResult async_show_form(self, *str|None step_id=None, vol.Schema|None data_schema=None, dict[str, str]|None errors=None, Mapping[str, str]|None description_placeholders=None, bool|None last_step=None, str|None preview=None)
vol.Schema add_suggested_values_to_schema(self, vol.Schema data_schema, Mapping[str, Any]|None suggested_values)
_FlowResultT async_show_form(self, *str|None step_id=None, vol.Schema|None data_schema=None, dict[str, str]|None errors=None, Mapping[str, str]|None description_placeholders=None, bool|None last_step=None, str|None preview=None)
_FlowResultT async_create_entry(self, *str|None title=None, Mapping[str, Any] data, str|None description=None, Mapping[str, str]|None description_placeholders=None)