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

Classes

class  HomeworksConfigFlowHandler
 

Functions

None _try_connection (dict[str, Any] user_input)
 
None _validate_address (SchemaCommonFlowHandler handler, str addr)
 
None _validate_button_number (SchemaCommonFlowHandler handler, int number)
 
None _validate_credentials (dict[str, Any] user_input)
 
dict[str, Any] get_edit_button_suggested_values (SchemaCommonFlowHandler handler)
 
dict[str, Any] get_edit_light_suggested_values (SchemaCommonFlowHandler handler)
 
vol.Schema get_remove_button_schema (SchemaCommonFlowHandler handler)
 
vol.Schema get_remove_keypad_light_schema (SchemaCommonFlowHandler handler, *str key)
 
vol.Schema get_select_button_schema (SchemaCommonFlowHandler handler)
 
vol.Schema get_select_keypad_schema (SchemaCommonFlowHandler handler)
 
vol.Schema get_select_light_schema (SchemaCommonFlowHandler handler)
 
dict[str, Any] validate_add_button (SchemaCommonFlowHandler handler, dict[str, Any] user_input)
 
dict[str, Any] validate_add_controller (ConfigFlow|SchemaOptionsFlowHandler handler, dict[str, Any] user_input)
 
dict[str, Any] validate_add_keypad (SchemaCommonFlowHandler handler, dict[str, Any] user_input)
 
dict[str, Any] validate_add_light (SchemaCommonFlowHandler handler, dict[str, Any] user_input)
 
dict[str, Any] validate_button_edit (SchemaCommonFlowHandler handler, dict[str, Any] user_input)
 
dict[str, Any] validate_light_edit (SchemaCommonFlowHandler handler, dict[str, Any] user_input)
 
dict[str, Any] validate_remove_button (SchemaCommonFlowHandler handler, dict[str, Any] user_input)
 
dict[str, Any] validate_remove_keypad_light (SchemaCommonFlowHandler handler, dict[str, Any] user_input, *str key)
 
dict[str, Any] validate_select_button (SchemaCommonFlowHandler handler, dict[str, Any] user_input)
 
dict[str, Any] validate_select_keypad_light (SchemaCommonFlowHandler handler, dict[str, Any] user_input)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 CONF_LED
 
 CONF_RATE
 
 CONF_RELEASE_DELAY
 
dictionary CONTROLLER_EDIT
 
 DATA_SCHEMA_ADD_BUTTON
 
 DATA_SCHEMA_ADD_CONTROLLER
 
 DATA_SCHEMA_ADD_KEYPAD
 
 DATA_SCHEMA_ADD_LIGHT
 
 DATA_SCHEMA_EDIT_BUTTON = vol.Schema(BUTTON_EDIT)
 
 DATA_SCHEMA_EDIT_CONTROLLER = vol.Schema(CONTROLLER_EDIT)
 
 DATA_SCHEMA_EDIT_LIGHT = vol.Schema(LIGHT_EDIT)
 
 default
 
float DEFAULT_FADE_RATE = 1.0
 
dictionary OPTIONS_FLOW
 
 validate_addr = cv.matches_regex(r"\[(?:\d\d:){2,4}\d\d\]")
 
 VolDictType
 

Detailed Description

Lutron Homeworks Series 4 and 8 config flow.

Function Documentation

◆ _try_connection()

None homeassistant.components.homeworks.config_flow._try_connection ( dict[str, Any]  user_input)
private
Try connecting to the controller.

Definition at line 139 of file config_flow.py.

◆ _validate_address()

None homeassistant.components.homeworks.config_flow._validate_address ( SchemaCommonFlowHandler  handler,
str  addr 
)
private
Validate address.

Definition at line 179 of file config_flow.py.

◆ _validate_button_number()

None homeassistant.components.homeworks.config_flow._validate_button_number ( SchemaCommonFlowHandler  handler,
int  number 
)
private
Validate button number.

Definition at line 194 of file config_flow.py.

◆ _validate_credentials()

None homeassistant.components.homeworks.config_flow._validate_credentials ( dict[str, Any]  user_input)
private
Validate credentials.

Definition at line 107 of file config_flow.py.

◆ get_edit_button_suggested_values()

dict[str, Any] homeassistant.components.homeworks.config_flow.get_edit_button_suggested_values ( SchemaCommonFlowHandler  handler)
Return suggested values for button editing.

Definition at line 306 of file config_flow.py.

◆ get_edit_light_suggested_values()

dict[str, Any] homeassistant.components.homeworks.config_flow.get_edit_light_suggested_values ( SchemaCommonFlowHandler  handler)
Return suggested values for light editing.

Definition at line 315 of file config_flow.py.

◆ get_remove_button_schema()

vol.Schema homeassistant.components.homeworks.config_flow.get_remove_button_schema ( SchemaCommonFlowHandler  handler)
Return schema for button removal.

Definition at line 347 of file config_flow.py.

◆ get_remove_keypad_light_schema()

vol.Schema homeassistant.components.homeworks.config_flow.get_remove_keypad_light_schema ( SchemaCommonFlowHandler  handler,
*str   key 
)
Return schema for keypad or light removal.

Definition at line 363 of file config_flow.py.

◆ get_select_button_schema()

vol.Schema homeassistant.components.homeworks.config_flow.get_select_button_schema ( SchemaCommonFlowHandler  handler)
Return schema for selecting a button.

Definition at line 245 of file config_flow.py.

◆ get_select_keypad_schema()

vol.Schema homeassistant.components.homeworks.config_flow.get_select_keypad_schema ( SchemaCommonFlowHandler  handler)
Return schema for selecting a keypad.

Definition at line 262 of file config_flow.py.

◆ get_select_light_schema()

vol.Schema homeassistant.components.homeworks.config_flow.get_select_light_schema ( SchemaCommonFlowHandler  handler)
Return schema for selecting a light.

Definition at line 276 of file config_flow.py.

◆ validate_add_button()

dict[str, Any] homeassistant.components.homeworks.config_flow.validate_add_button ( SchemaCommonFlowHandler  handler,
dict[str, Any]   user_input 
)
Validate button input.

Definition at line 204 of file config_flow.py.

◆ validate_add_controller()

dict[str, Any] homeassistant.components.homeworks.config_flow.validate_add_controller ( ConfigFlow | SchemaOptionsFlowHandler  handler,
dict[str, Any]   user_input 
)
Validate controller setup.

Definition at line 113 of file config_flow.py.

◆ validate_add_keypad()

dict[str, Any] homeassistant.components.homeworks.config_flow.validate_add_keypad ( SchemaCommonFlowHandler  handler,
dict[str, Any]   user_input 
)
Validate keypad or light input.

Definition at line 219 of file config_flow.py.

◆ validate_add_light()

dict[str, Any] homeassistant.components.homeworks.config_flow.validate_add_light ( SchemaCommonFlowHandler  handler,
dict[str, Any]   user_input 
)
Validate light input.

Definition at line 232 of file config_flow.py.

◆ validate_button_edit()

dict[str, Any] homeassistant.components.homeworks.config_flow.validate_button_edit ( SchemaCommonFlowHandler  handler,
dict[str, Any]   user_input 
)
Update edited keypad or light.

Definition at line 323 of file config_flow.py.

◆ validate_light_edit()

dict[str, Any] homeassistant.components.homeworks.config_flow.validate_light_edit ( SchemaCommonFlowHandler  handler,
dict[str, Any]   user_input 
)
Update edited keypad or light.

Definition at line 336 of file config_flow.py.

◆ validate_remove_button()

dict[str, Any] homeassistant.components.homeworks.config_flow.validate_remove_button ( SchemaCommonFlowHandler  handler,
dict[str, Any]   user_input 
)
Validate remove keypad or light.

Definition at line 379 of file config_flow.py.

◆ validate_remove_keypad_light()

dict[str, Any] homeassistant.components.homeworks.config_flow.validate_remove_keypad_light ( SchemaCommonFlowHandler  handler,
dict[str, Any]  user_input,
*str   key 
)
Validate remove keypad or light.

Definition at line 411 of file config_flow.py.

◆ validate_select_button()

dict[str, Any] homeassistant.components.homeworks.config_flow.validate_select_button ( SchemaCommonFlowHandler  handler,
dict[str, Any]   user_input 
)
Store button index in flow state.

Definition at line 290 of file config_flow.py.

◆ validate_select_keypad_light()

dict[str, Any] homeassistant.components.homeworks.config_flow.validate_select_keypad_light ( SchemaCommonFlowHandler  handler,
dict[str, Any]   user_input 
)
Store keypad or light index in flow state.

Definition at line 298 of file config_flow.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.homeworks.config_flow._LOGGER = logging.getLogger(__name__)
private

Definition at line 60 of file config_flow.py.

◆ CONF_LED

homeassistant.components.homeworks.config_flow.CONF_LED

Definition at line 91 of file config_flow.py.

◆ CONF_RATE

homeassistant.components.homeworks.config_flow.CONF_RATE

Definition at line 80 of file config_flow.py.

◆ CONF_RELEASE_DELAY

homeassistant.components.homeworks.config_flow.CONF_RELEASE_DELAY

Definition at line 92 of file config_flow.py.

◆ CONTROLLER_EDIT

dictionary homeassistant.components.homeworks.config_flow.CONTROLLER_EDIT
Initial value:
1 = {
2  vol.Required(CONF_HOST): selector.TextSelector(),
3  vol.Required(CONF_PORT): selector.NumberSelector(
4  selector.NumberSelectorConfig(
5  min=1,
6  max=65535,
7  mode=selector.NumberSelectorMode.BOX,
8  )
9  ),
10  vol.Optional(CONF_USERNAME): selector.TextSelector(),
11  vol.Optional(CONF_PASSWORD): selector.TextSelector(
12  selector.TextSelectorConfig(type=selector.TextSelectorType.PASSWORD)
13  ),
14 }

Definition at line 64 of file config_flow.py.

◆ DATA_SCHEMA_ADD_BUTTON

homeassistant.components.homeworks.config_flow.DATA_SCHEMA_ADD_BUTTON
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_NAME, default=DEFAULT_BUTTON_NAME): TextSelector(),
4  vol.Required(CONF_NUMBER): selector.NumberSelector(
5  selector.NumberSelectorConfig(
6  min=1,
7  max=24,
8  step=1,
9  mode=selector.NumberSelectorMode.BOX,
10  ),
11  ),
12  **BUTTON_EDIT,
13  }
14 )

Definition at line 461 of file config_flow.py.

◆ DATA_SCHEMA_ADD_CONTROLLER

homeassistant.components.homeworks.config_flow.DATA_SCHEMA_ADD_CONTROLLER
Initial value:
1 = vol.Schema(
2  {
3  vol.Required(
4  CONF_NAME, description={"suggested_value": "Lutron Homeworks"}
5  ): selector.TextSelector(),
6  **CONTROLLER_EDIT,
7  }
8 )

Definition at line 439 of file config_flow.py.

◆ DATA_SCHEMA_ADD_KEYPAD

homeassistant.components.homeworks.config_flow.DATA_SCHEMA_ADD_KEYPAD
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_NAME, default=DEFAULT_KEYPAD_NAME): TextSelector(),
4  vol.Required(CONF_ADDR): TextSelector(),
5  }
6 )

Definition at line 455 of file config_flow.py.

◆ DATA_SCHEMA_ADD_LIGHT

homeassistant.components.homeworks.config_flow.DATA_SCHEMA_ADD_LIGHT
Initial value:
1 = vol.Schema(
2  {
3  vol.Optional(CONF_NAME, default=DEFAULT_LIGHT_NAME): TextSelector(),
4  vol.Required(CONF_ADDR): TextSelector(),
5  **LIGHT_EDIT,
6  }
7 )

Definition at line 448 of file config_flow.py.

◆ DATA_SCHEMA_EDIT_BUTTON

homeassistant.components.homeworks.config_flow.DATA_SCHEMA_EDIT_BUTTON = vol.Schema(BUTTON_EDIT)

Definition at line 475 of file config_flow.py.

◆ DATA_SCHEMA_EDIT_CONTROLLER

homeassistant.components.homeworks.config_flow.DATA_SCHEMA_EDIT_CONTROLLER = vol.Schema(CONTROLLER_EDIT)

Definition at line 447 of file config_flow.py.

◆ DATA_SCHEMA_EDIT_LIGHT

homeassistant.components.homeworks.config_flow.DATA_SCHEMA_EDIT_LIGHT = vol.Schema(LIGHT_EDIT)

Definition at line 476 of file config_flow.py.

◆ default

homeassistant.components.homeworks.config_flow.default

Definition at line 80 of file config_flow.py.

◆ DEFAULT_FADE_RATE

float homeassistant.components.homeworks.config_flow.DEFAULT_FADE_RATE = 1.0

Definition at line 62 of file config_flow.py.

◆ OPTIONS_FLOW

dictionary homeassistant.components.homeworks.config_flow.OPTIONS_FLOW

Definition at line 478 of file config_flow.py.

◆ validate_addr

homeassistant.components.homeworks.config_flow.validate_addr = cv.matches_regex(r"\[(?:\d\d:){2,4}\d\d\]")

Definition at line 104 of file config_flow.py.

◆ VolDictType

homeassistant.components.homeworks.config_flow.VolDictType

Definition at line 79 of file config_flow.py.