|
| None | __init__ (self, HomeAssistant hass) |
| |
| LabelEntry | async_create (self, str name, *str|None color=None, str|None icon=None, str|None description=None) |
| |
| None | async_delete (self, str label_id) |
| |
| LabelEntry|None | async_get_label (self, str label_id) |
| |
| LabelEntry|None | async_get_label_by_name (self, str name) |
| |
| Iterable[LabelEntry] | async_list_labels (self) |
| |
| None | async_load (self) |
| |
| LabelEntry | async_update (self, str label_id, *str|None|UndefinedType color=UNDEFINED, str|None|UndefinedType description=UNDEFINED, str|None|UndefinedType icon=UNDEFINED, str|UndefinedType name=UNDEFINED) |
| |
Class to hold a registry of labels.
Definition at line 95 of file label_registry.py.
◆ __init__()
| None homeassistant.helpers.label_registry.LabelRegistry.__init__ |
( |
|
self, |
|
|
HomeAssistant |
hass |
|
) |
| |
◆ _data_to_save()
◆ _generate_id()
| str homeassistant.helpers.label_registry.LabelRegistry._generate_id |
( |
|
self, |
|
|
str |
name |
|
) |
| |
|
private |
◆ async_create()
| LabelEntry homeassistant.helpers.label_registry.LabelRegistry.async_create |
( |
|
self, |
|
|
str |
name, |
|
|
*str | None |
color = None, |
|
|
str | None |
icon = None, |
|
|
str | None |
description = None |
|
) |
| |
◆ async_delete()
| None homeassistant.helpers.label_registry.LabelRegistry.async_delete |
( |
|
self, |
|
|
str |
label_id |
|
) |
| |
◆ async_get_label()
| LabelEntry | None homeassistant.helpers.label_registry.LabelRegistry.async_get_label |
( |
|
self, |
|
|
str |
label_id |
|
) |
| |
Get label by ID.
We retrieve the LabelEntry from the underlying dict to avoid
the overhead of the UserDict __getitem__.
Definition at line 113 of file label_registry.py.
◆ async_get_label_by_name()
| LabelEntry | None homeassistant.helpers.label_registry.LabelRegistry.async_get_label_by_name |
( |
|
self, |
|
|
str |
name |
|
) |
| |
◆ async_list_labels()
| Iterable[LabelEntry] homeassistant.helpers.label_registry.LabelRegistry.async_list_labels |
( |
|
self | ) |
|
◆ async_load()
| None homeassistant.helpers.label_registry.LabelRegistry.async_load |
( |
|
self | ) |
|
◆ async_update()
◆ _label_data
| homeassistant.helpers.label_registry.LabelRegistry._label_data |
|
private |
◆ _store
| homeassistant.helpers.label_registry.LabelRegistry._store |
|
private |
◆ hass
| homeassistant.helpers.label_registry.LabelRegistry.hass |
◆ labels
| homeassistant.helpers.label_registry.LabelRegistry.labels |
The documentation for this class was generated from the following file: