1 """Config flow to configure demo component."""
3 from __future__
import annotations
7 import voluptuous
as vol
20 CONF_STRING =
"string"
23 CONF_SELECT =
"select"
24 CONF_MULTISELECT =
"multi"
28 """Demo configuration flow."""
35 config_entry: ConfigEntry,
36 ) -> OptionsFlowHandler:
37 """Get the options flow for this handler."""
41 """Set the config entry up from yaml."""
48 def __init__(self, config_entry: ConfigEntry) ->
None:
49 """Initialize options flow."""
53 self, user_input: dict[str, Any] |
None =
None
54 ) -> ConfigFlowResult:
55 """Manage the options."""
59 self, user_input: dict[str, Any] |
None =
None
60 ) -> ConfigFlowResult:
61 """Manage the options."""
62 if user_input
is not None:
68 data_schema=vol.Schema(
70 vol.Required(
"constant"):
"Constant Value",
84 self, user_input: dict[str, Any] |
None =
None
85 ) -> ConfigFlowResult:
86 """Manage the options 2."""
87 if user_input
is not None:
93 data_schema=vol.Schema(
105 ): vol.In([
"default",
"other"]),
109 CONF_MULTISELECT, [
"default"]
111 ): cv.multi_select({
"default":
"Default",
"other":
"Other"}),
117 """Update config entry options."""
OptionsFlowHandler async_get_options_flow(ConfigEntry config_entry)
ConfigFlowResult async_step_import(self, dict[str, Any] import_data)
ConfigFlowResult async_step_options_1(self, dict[str, Any]|None user_input=None)
ConfigFlowResult async_step_init(self, dict[str, Any]|None user_input=None)
ConfigFlowResult async_step_options_2(self, dict[str, Any]|None user_input=None)
None __init__(self, ConfigEntry config_entry)
ConfigFlowResult _update_options(self)
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)
ConfigEntry config_entry(self)
None config_entry(self, ConfigEntry value)
_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)
IssData update(pyiss.ISS iss)