Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.shopping_list Namespace Reference

Namespaces

 config_flow
 
 const
 
 intent
 
 todo
 

Classes

class  ClearCompletedItemsView
 
class  CreateShoppingListItemView
 
class  NoMatchingShoppingListItem
 
class  ShoppingData
 
class  ShoppingListView
 
class  UpdateShoppingListItemView
 

Functions

bool async_setup (HomeAssistant hass, ConfigType config)
 
bool async_setup_entry (HomeAssistant hass, ConfigEntry config_entry)
 
None websocket_handle_add (HomeAssistant hass, websocket_api.ActiveConnection connection, dict[str, Any] msg)
 
None websocket_handle_clear (HomeAssistant hass, websocket_api.ActiveConnection connection, dict[str, Any] msg)
 
None websocket_handle_items (HomeAssistant hass, websocket_api.ActiveConnection connection, dict[str, Any] msg)
 
None websocket_handle_remove (HomeAssistant hass, websocket_api.ActiveConnection connection, dict[str, Any] msg)
 
None websocket_handle_reorder (HomeAssistant hass, websocket_api.ActiveConnection connection, dict[str, Any] msg)
 
None websocket_handle_update (HomeAssistant hass, websocket_api.ActiveConnection connection, dict[str, Any] msg)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
string ATTR_COMPLETE = "complete"
 
 CONFIG_SCHEMA = vol.Schema({DOMAIN: {}}, extra=vol.ALLOW_EXTRA)
 
 ITEM_UPDATE_SCHEMA = vol.Schema({ATTR_COMPLETE: bool, ATTR_NAME: str})
 
string PERSISTENCE = ".shopping_list.json"
 
list PLATFORMS = [Platform.TODO]
 
 SERVICE_ITEM_SCHEMA = vol.Schema({vol.Required(ATTR_NAME): cv.string})
 
 SERVICE_LIST_SCHEMA = vol.Schema({})
 
 SERVICE_SORT_SCHEMA
 

Detailed Description

Support to manage a shopping list.

Function Documentation

◆ async_setup()

bool homeassistant.components.shopping_list.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Initialize the shopping list.

Definition at line 56 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.shopping_list.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  config_entry 
)
Set up shopping list from config flow.

Definition at line 71 of file __init__.py.

◆ websocket_handle_add()

None homeassistant.components.shopping_list.websocket_handle_add ( HomeAssistant  hass,
websocket_api.ActiveConnection  connection,
dict[str, Any]  msg 
)
Handle adding item to shopping_list.

Definition at line 485 of file __init__.py.

◆ websocket_handle_clear()

None homeassistant.components.shopping_list.websocket_handle_clear ( HomeAssistant  hass,
websocket_api.ActiveConnection  connection,
dict[str, Any]  msg 
)
Handle clearing shopping_list items.

Definition at line 557 of file __init__.py.

◆ websocket_handle_items()

None homeassistant.components.shopping_list.websocket_handle_items ( HomeAssistant  hass,
websocket_api.ActiveConnection  connection,
dict[str, Any]  msg 
)
Handle getting shopping_list items.

Definition at line 470 of file __init__.py.

◆ websocket_handle_remove()

None homeassistant.components.shopping_list.websocket_handle_remove ( HomeAssistant  hass,
websocket_api.ActiveConnection  connection,
dict[str, Any]  msg 
)
Handle removing shopping_list item.

Definition at line 501 of file __init__.py.

◆ websocket_handle_reorder()

None homeassistant.components.shopping_list.websocket_handle_reorder ( HomeAssistant  hass,
websocket_api.ActiveConnection  connection,
dict[str, Any]  msg 
)
Handle reordering shopping_list items.

Definition at line 573 of file __init__.py.

◆ websocket_handle_update()

None homeassistant.components.shopping_list.websocket_handle_update ( HomeAssistant  hass,
websocket_api.ActiveConnection  connection,
dict[str, Any]  msg 
)
Handle updating shopping_list item.

Definition at line 531 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.shopping_list._LOGGER = logging.getLogger(__name__)
private

Definition at line 44 of file __init__.py.

◆ ATTR_COMPLETE

string homeassistant.components.shopping_list.ATTR_COMPLETE = "complete"

Definition at line 42 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.shopping_list.CONFIG_SCHEMA = vol.Schema({DOMAIN: {}}, extra=vol.ALLOW_EXTRA)

Definition at line 45 of file __init__.py.

◆ ITEM_UPDATE_SCHEMA

homeassistant.components.shopping_list.ITEM_UPDATE_SCHEMA = vol.Schema({ATTR_COMPLETE: bool, ATTR_NAME: str})

Definition at line 46 of file __init__.py.

◆ PERSISTENCE

string homeassistant.components.shopping_list.PERSISTENCE = ".shopping_list.json"

Definition at line 47 of file __init__.py.

◆ PLATFORMS

list homeassistant.components.shopping_list.PLATFORMS = [Platform.TODO]

Definition at line 40 of file __init__.py.

◆ SERVICE_ITEM_SCHEMA

homeassistant.components.shopping_list.SERVICE_ITEM_SCHEMA = vol.Schema({vol.Required(ATTR_NAME): cv.string})

Definition at line 49 of file __init__.py.

◆ SERVICE_LIST_SCHEMA

homeassistant.components.shopping_list.SERVICE_LIST_SCHEMA = vol.Schema({})

Definition at line 50 of file __init__.py.

◆ SERVICE_SORT_SCHEMA

homeassistant.components.shopping_list.SERVICE_SORT_SCHEMA
Initial value:
1 = vol.Schema(
2  {vol.Optional(ATTR_REVERSE, default=DEFAULT_REVERSE): bool}
3 )

Definition at line 51 of file __init__.py.