|
| None | __init__ (self, HomeAssistant hass) |
| |
| dict[str, JsonValueType] | async_add (self, str|None name, bool complete=False, Context|None context=None) |
| |
| Callable[[], None] | async_add_listener (self, Callable[[], None] cb) |
| |
| None | async_clear_completed (self, Context|None context=None) |
| |
| None | async_load (self) |
| |
| None | async_move_item (self, str uid, str|None previous=None) |
| |
| dict[str, JsonValueType]|None | async_remove (self, str item_id, Context|None context=None) |
| |
| list[dict[str, JsonValueType]] | async_remove_items (self, set[str] item_ids, Context|None context=None) |
| |
| None | async_reorder (self, list[str] item_ids, Context|None context=None) |
| |
| None | async_sort (self, bool reverse=False, Context|None context=None) |
| |
| dict[str, JsonValueType] | async_update (self, str|None item_id, dict[str, Any] info, Context|None context=None) |
| |
| list[dict[str, JsonValueType]] | async_update_list (self, dict[str, JsonValueType] info, Context|None context=None) |
| |
| None | save (self) |
| |
Class to hold shopping list data.
Definition at line 195 of file __init__.py.
◆ __init__()
| None homeassistant.components.shopping_list.ShoppingData.__init__ |
( |
|
self, |
|
|
HomeAssistant |
hass |
|
) |
| |
Initialize the shopping list.
Definition at line 198 of file __init__.py.
◆ _async_notify()
| None homeassistant.components.shopping_list.ShoppingData._async_notify |
( |
|
self | ) |
|
|
private |
Notify all listeners that data has been updated.
Definition at line 403 of file __init__.py.
◆ async_add()
| dict[str, JsonValueType] homeassistant.components.shopping_list.ShoppingData.async_add |
( |
|
self, |
|
|
str | None |
name, |
|
|
bool |
complete = False, |
|
|
Context | None |
context = None |
|
) |
| |
◆ async_add_listener()
| Callable[[], None] homeassistant.components.shopping_list.ShoppingData.async_add_listener |
( |
|
self, |
|
|
Callable[[], None] |
cb |
|
) |
| |
Add a listener to notify when data is updated.
Definition at line 394 of file __init__.py.
◆ async_clear_completed()
| None homeassistant.components.shopping_list.ShoppingData.async_clear_completed |
( |
|
self, |
|
|
Context | None |
context = None |
|
) |
| |
◆ async_load()
| None homeassistant.components.shopping_list.ShoppingData.async_load |
( |
|
self | ) |
|
◆ async_move_item()
| None homeassistant.components.shopping_list.ShoppingData.async_move_item |
( |
|
self, |
|
|
str |
uid, |
|
|
str | None |
previous = None |
|
) |
| |
Re-order a shopping list item.
Definition at line 341 of file __init__.py.
◆ async_remove()
| dict[str, JsonValueType] | None homeassistant.components.shopping_list.ShoppingData.async_remove |
( |
|
self, |
|
|
str |
item_id, |
|
|
Context | None |
context = None |
|
) |
| |
Remove a shopping list item.
Definition at line 223 of file __init__.py.
◆ async_remove_items()
| list[dict[str, JsonValueType]] homeassistant.components.shopping_list.ShoppingData.async_remove_items |
( |
|
self, |
|
|
set[str] |
item_ids, |
|
|
Context | None |
context = None |
|
) |
| |
Remove a shopping list item.
Definition at line 232 of file __init__.py.
◆ async_reorder()
| None homeassistant.components.shopping_list.ShoppingData.async_reorder |
( |
|
self, |
|
|
list[str] |
item_ids, |
|
|
Context | None |
context = None |
|
) |
| |
◆ async_sort()
| None homeassistant.components.shopping_list.ShoppingData.async_sort |
( |
|
self, |
|
|
bool |
reverse = False, |
|
|
Context | None |
context = None |
|
) |
| |
◆ async_update()
| dict[str, JsonValueType] homeassistant.components.shopping_list.ShoppingData.async_update |
( |
|
self, |
|
|
str | None |
item_id, |
|
|
dict[str, Any] |
info, |
|
|
Context | None |
context = None |
|
) |
| |
Update a shopping list item.
Definition at line 261 of file __init__.py.
◆ async_update_list()
| list[dict[str, JsonValueType]] homeassistant.components.shopping_list.ShoppingData.async_update_list |
( |
|
self, |
|
|
dict[str, JsonValueType] |
info, |
|
|
Context | None |
context = None |
|
) |
| |
Update all items in the list.
Definition at line 292 of file __init__.py.
◆ save()
| None homeassistant.components.shopping_list.ShoppingData.save |
( |
|
self | ) |
|
◆ hass
| homeassistant.components.shopping_list.ShoppingData.hass |
◆ items
| homeassistant.components.shopping_list.ShoppingData.items |
The documentation for this class was generated from the following file:
- core/homeassistant/components/shopping_list/__init__.py