Help, how to use: todo.get_items

system_log.write writes into the system log, see here.

The OP used a notification to get notified.

1 Like

I got it working. I guess why I was so confused was how I should implement Jasons solution into OPā€™s code. But i figured that out, but it was still not working. The fault was a - (dash) after message: >

alias: "!Test todo"
description: ""
trigger: []
condition: []
action:
  - service: todo.get_items
    target:
      entity_id: todo.kvantum_apotek
    response_variable: mylist
  - service: notify.mobile_app_samsung_s22
    data:
      title: Daily agenda for {{ now().date() }}
      message: >
        Your agenda for today: <p> </p>

        {%- for item in mylist['todo.kvantum_apotek']['items'] %}
          {{ item.summary }}
        {%- endfor %}
mode: single

Thank you for your help and effort!

1 Like

Hello everyone,

Iā€™m trying to use automation. Unfortunately I always get the error message:
ā€œError rendering data template: UndefinedError: ā€˜mylistā€™ is undefinedā€

Do I have to create the ā€œresponse_variableā€ somewhere or is it created automatically?

alias: Shoppinglist
description: ""
trigger:
  - platform: zone
    entity_id: device_tracker.fordpass_tracker_2
    zone: zone.einkaufen_aldi
    event: enter
    id: "1"
condition: []
action:
  - service: todo.get_items
    target:
      entity_id: todo.aldi
    response_variable: mylist
    data:
      status:
        - needs_action
  - service: notify.hassio808_bot
    data:
      title: Daily agenda for {{ now().date() }}
      message: |
        Your agenda for today: <p> </p>
        {%- for item in mylist['todo.aldi']['items'] %}
          {{ item.summary }}
        {%- endfor %}
mode: single

It is created at that moment.

As a first guess: does the entity_id todo.aldi exist under that name?

Is there a way to get the individual tasks to add to my news ticker when they are due? I tried adding sensor.todo_home_assistant_list_task_1 to

- type: custom:html-card
  content: |
    <div class="ticker-wrap">
      <div class="ticker">
        <div class="ticker">
          <span class="ticker__item" style="color: #39FF14;">Ragweed Pollen Index: [[ sensor.toronto_ragweed_pollen_day_0 ]]</span>
          <span class="ticker__item" style="color: #39FF14;">Grass Pollen Index: [[ sensor.toronto_grass_pollen_day_0 ]]</span>
          <span class="ticker__item" style="color: #39FF14;">Tree Pollen Index: [[ sensor.toronto_tree_pollen_day_0 ]]</span>
          <span class="ticker__item" style="text-transform: uppercase; color: #00E7FF; font-weight: bold;">Forecast: </span>
          <span class="ticker__item" style="color: white;">[[ sensor.toronto_summary ]]</span>
          <span class="ticker__item" style="text-transform: uppercase; color: #00E7FF; font-weight: bold;">In the news today: </span>
          <span class="ticker__item" style="color: white;">
            [[ sensor.ctv_news_politics_attributes_0 ]]
            <img src="/local/lovelace/overlays/Round Menu/4/CTV News8.png" alt="logo" style="height: 20px; vertical-align: middle;">
          </span>
          <span class="ticker__item" style="color: white;">
            [[ sensor.cbs_news_top_stories_attributes_0 ]]
            <img src="/local/lovelace/overlays/Round Menu/4/CBS News2.png" alt="logo" style="height: 20px; vertical-align: middle;">
          </span>
          <span class="ticker__item" style="text-transform: uppercase; color: #00E7FF; font-weight: bold;">To-Do List: </span>
          <span class="ticker__item" style="color: white;">
            [[ sensor.todo_home_assistant_list_task_1 ]]
          </span>
          <span class="ticker__item" style="color: white;">
            [[ sensor.todo_list_task_2 ]]
          </span>
          <span class="ticker__item" style="color: white;">
            [[ sensor.todo_home_assistant_list_task_2 ]]
          </span>
        </div>
      </div>

the ticker works, as it did before, however when it gets to the tasks, the sensor name is all that goes across my screen, not the actual task. Is there a different way to label the sensor names other than adding _task_1 or _task_2 at the end of the listā€™s sensor name?

Any help is most appreciated. Thanks you kindly :slight_smile: