Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.config.label_registry Namespace Reference

Functions

dict[str, Any] _entry_dict (LabelEntry entry)
 
bool async_setup (HomeAssistant hass)
 
None websocket_create_label (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg)
 
None websocket_delete_label (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg)
 
None websocket_list_labels (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg)
 
None websocket_update_label (HomeAssistant hass, ActiveConnection connection, dict[str, Any] msg)
 

Variables

dictionary SUPPORTED_LABEL_THEME_COLORS
 

Detailed Description

Websocket API to interact with the label registry.

Function Documentation

◆ _entry_dict()

dict[str, Any] homeassistant.components.config.label_registry._entry_dict ( LabelEntry  entry)
private
Convert entry to API format.

Definition at line 156 of file label_registry.py.

◆ async_setup()

bool homeassistant.components.config.label_registry.async_setup ( HomeAssistant  hass)
Register the Label Registry WS commands.

Definition at line 44 of file label_registry.py.

◆ websocket_create_label()

None homeassistant.components.config.label_registry.websocket_create_label ( HomeAssistant  hass,
ActiveConnection  connection,
dict[str, Any]   msg 
)
Create label command.

Definition at line 83 of file label_registry.py.

◆ websocket_delete_label()

None homeassistant.components.config.label_registry.websocket_delete_label ( HomeAssistant  hass,
ActiveConnection  connection,
dict[str, Any]   msg 
)
Delete label command.

Definition at line 109 of file label_registry.py.

◆ websocket_list_labels()

None homeassistant.components.config.label_registry.websocket_list_labels ( HomeAssistant  hass,
ActiveConnection  connection,
dict[str, Any]   msg 
)
Handle list labels command.

Definition at line 59 of file label_registry.py.

◆ websocket_update_label()

None homeassistant.components.config.label_registry.websocket_update_label ( HomeAssistant  hass,
ActiveConnection  connection,
dict[str, Any]   msg 
)
Handle update label websocket command.

Definition at line 137 of file label_registry.py.

Variable Documentation

◆ SUPPORTED_LABEL_THEME_COLORS

dictionary homeassistant.components.config.label_registry.SUPPORTED_LABEL_THEME_COLORS
Initial value:
1 = {
2  "primary",
3  "accent",
4  "disabled",
5  "red",
6  "pink",
7  "purple",
8  "deep-purple",
9  "indigo",
10  "blue",
11  "light-blue",
12  "cyan",
13  "teal",
14  "green",
15  "light-green",
16  "lime",
17  "yellow",
18  "amber",
19  "orange",
20  "deep-orange",
21  "brown",
22  "light-grey",
23  "grey",
24  "dark-grey",
25  "blue-grey",
26  "black",
27  "white",
28 }

Definition at line 13 of file label_registry.py.