I’m setting up a Home Assistant automation to push my shopping list notifications to my mobile device when I arrive at specific stores, to streamline access without needing to open the app manually. However, I’m encountering an issue where my call to the shopping list returns ‘None’.
hi… please use the code formatting in order to make the code that you post readable. hit the </> button or use 3 `
see this post for more info:
in terms of your question,
that’s not quite correct for how you access todo items. you need to call get_item that will then put the items into a response_variable.
try something like this in your action section:
action:
- service: todo.get_items
metadata: {}
data:
status: needs_action
target:
entity_id: todo.shopping_list
response_variable: get_item_results
- service: notify.persistent_notification
data:
title: Shopping List
message: |
{%- for item in get_item_results['todo.shopping_list']['items'] %}
{{ item.summary }}
{%- endfor %}