Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.template.config_flow Namespace Reference

Classes

class  TemplateConfigFlowHandler
 

Functions

None _validate_state_class (dict[str, Any] options)
 
None _validate_unit (dict[str, Any] options)
 
str choose_options_step (dict[str, Any] options)
 
vol.Schema generate_schema (str domain, str flow_type)
 
Callable[[SchemaCommonFlowHandler, dict[str, Any]], Coroutine[Any, Any, dict[str, Any]],] validate_user_input (str template_type)
 
None ws_start_preview (HomeAssistant hass, websocket_api.ActiveConnection connection, dict[str, Any] msg)
 

Variables

dictionary CONFIG_FLOW
 
 config_schema = partial(generate_schema, flow_type="config")
 
dictionary OPTIONS_FLOW
 
 options_schema = partial(generate_schema, flow_type="options")
 
list TEMPLATE_TYPES
 

Detailed Description

Config flow for the Template integration.

Function Documentation

◆ _validate_state_class()

None homeassistant.components.template.config_flow._validate_state_class ( dict[str, Any]  options)
private
Validate state class.

Definition at line 253 of file config_flow.py.

◆ _validate_unit()

None homeassistant.components.template.config_flow._validate_unit ( dict[str, Any]  options)
private
Validate unit of measurement.

Definition at line 231 of file config_flow.py.

◆ choose_options_step()

str homeassistant.components.template.config_flow.choose_options_step ( dict[str, Any]  options)
Return next step_id for options flow according to template_type.

Definition at line 226 of file config_flow.py.

◆ generate_schema()

vol.Schema homeassistant.components.template.config_flow.generate_schema ( str  domain,
str  flow_type 
)
Generate schema.

Definition at line 76 of file config_flow.py.

◆ validate_user_input()

Callable[ [SchemaCommonFlowHandler, dict[str, Any]], Coroutine[Any, Any, dict[str, Any]], ] homeassistant.components.template.config_flow.validate_user_input ( str  template_type)
Do post validation of user input.

For sensors: Validate unit of measurement.
For all domaines: Set template type.

Definition at line 278 of file config_flow.py.

◆ ws_start_preview()

None homeassistant.components.template.config_flow.ws_start_preview ( HomeAssistant  hass,
websocket_api.ActiveConnection  connection,
dict[str, Any]  msg 
)
Generate a preview.

Definition at line 432 of file config_flow.py.

Variable Documentation

◆ CONFIG_FLOW

dictionary homeassistant.components.template.config_flow.CONFIG_FLOW

Definition at line 314 of file config_flow.py.

◆ config_schema

homeassistant.components.template.config_flow.config_schema = partial(generate_schema, flow_type="config")

Definition at line 223 of file config_flow.py.

◆ OPTIONS_FLOW

dictionary homeassistant.components.template.config_flow.OPTIONS_FLOW

Definition at line 355 of file config_flow.py.

◆ options_schema

homeassistant.components.template.config_flow.options_schema = partial(generate_schema, flow_type="options")

Definition at line 221 of file config_flow.py.

◆ TEMPLATE_TYPES

list homeassistant.components.template.config_flow.TEMPLATE_TYPES
Initial value:
1 = [
2  "alarm_control_panel",
3  "binary_sensor",
4  "button",
5  "image",
6  "number",
7  "select",
8  "sensor",
9  "switch",
10 ]

Definition at line 303 of file config_flow.py.