I recently added the shopping list, hoping to make it automated and interactive using other services.
Although the default Shopping List is very simple, it’s also cumbersome in its use (can’t ‘complete’ all at once).
My biggest disapointment was when I tried to integrate it and send me the list when I’m entering the shop. Turns out the Shopping List doesnt expose its state.
I therefore created a command line sensor, parsing the .shopping_list.json
file, but its lacks instant updating when the list changes.
Trying to automate things made it even worse as we only have 2 service calls, which need matchin on names. The Shopping List fails to complete items with a duplicate name etc.
My request is to have the Shopping List stored somewhere as an entity, where its state is exposed. Maybe even under its own domain so we can have multiple lists? shopping_list.groceries
, shopping_list.home_depot
Would be great to be able to do something like this:
- alias: send_groceries_list:
trigger:
platform: zone
entity_id: person.owner
zone: zone.grocery_store
event: enter
action:
- service: telegram_bot.send_message
data:
title: '*Groceries list*'
message: '{{ states.shopping_list.groceries.state }}' # needs to be formatted, up to the user
Or deleting through automations:
service: shopping_list.complete_item
data:
entity_id: shopping_list.groceries
item_id: <whatever the id is of an item>
remove_from_list: true # Optional, but to indicate we don't want to keep it under 'completed'