#being able to list items on a todo list?

1 messages · Page 1 of 1 (latest)

quaint adder
#

i been messing around with assist and i find it really weird that it cant list the items that are on a shopping list or a todo list im assuming i might have done something wrong. the best i got out of it is it will say how many items are on the list but never what they are

lilac zephyr
thorn pebble
quaint adder
#

i do not use any custom intents right now

thorn pebble
quaint adder
#
    speech:
      text: >
        {% set entity_id = states.todo | selectattr('name', 'in', [name]) | map(attribute='entity_id') | list | first | default(None) %}
        {% set tasks = state_attr(entity_id, 'unchecked_items') %}
        {% if not tasks %}
        There are no items in  {{ name }}.
        {% else %}
        on the {{ name }} there is:
        {% for task in tasks %}{{task}}{% if not loop.last %}
        {% endif %}{% endfor %}.
        {% endif %}```
#
intents:
  listtodo:
    data:
      - sentences:
          - "is there anything on [the] {name} [list]"
          - "whats on [the] {name} [list]"
          - "list [the] {name} [list]"
          - "tell me whats on [the] {name} [list]"
        slots:
          name: "all"
          domain: "todo"
#

put this together works alright

night plaza
#

Is this still valid? I tried but always get same answer "There are no items in <name of the list>" even if I have items in my list.

quaint adder
#

still works for me

#

try copying the code into the template viewer and see if anything gets listed

true basalt
#

Is your list exposed to assist?

quaint adder
#

Yeah check that too

#

I haven't checked but no items on list might be the default action if it can't find the list at all

grim crescent
night plaza
grim crescent
grim crescent
quaint adder
#

i made this to work with the anylist custom integration as thats the only todo list i use, im guessing that it may have values that dont work with the standard todo list intergration looking at the issues