How to complete a list of tasks from a notificaton

Hi there!

I have managed to create a task tracker that uses sensors to track due dates and then scripts to set the date to x amount of days in the future on clicking an associated button for the task on the lovelace dashboard:

I also have an automation that send me a notification to my phone every day at 9am with a list of the day’s tasks. It gets it’s information from a due date sensor:

#Due Date Sensor
  - platform: template
          friendly_name: "Due Date"
          value_template: >
            {%- for state in states.input_datetime %} 
            {%- if ((state.state_with_unit == now().strftime('%Y-%m-%d') )) %}
            {% endif -%} {% endfor %}
alias: NOTIFICATION - Cleaning Tasks Due Today
description: ''
  - platform: time
    at: '09:00'
condition: []
  - service: notify.mobile_app_sarah_s_phone
      title: Today's Cleaning Tasks
          - action: URI
            title: Complete Today's Tasks
      message: '{{ states.sensor.due_date.state }}'
mode: single

This all works great! Where I’ve come unstuck is that I wanted to be able to click the notification and have it call the respective scripts based on the tasks in the notification to complete the tasks and update the due date.

I created a sensor that gets me the entity ids of the tasks in the notification but I can’t figure out a way for me to use those in a script as they don’t appear to be in an array (and indeed I couldn’t figure arrays out in jinja at all!).

Is this an impossible dream?! My stop gap for now is simply opening the lovelace view with the tasks on it but this is a bit of a pain because you then have to hunt for the tasks you want to complete in the list.

Any help or insight much appreciated!

Did you ever solve this? I am trying to do something similar and came across this old post. Not many people seem to be interested in tracking a maintenance schedule that is not calendar based, To use your examples - if you decide the guest room needs to be cleaned every 7 days then when you do the task it should reset to 7 days later - especially if it has been say 10 days since you last did it. Setting a weekly schedule on a calendar app for such a task does not work. For years I have been using an android app called MAcTrack (Maintenance Activity Tracker from The developer of that app did a great job but has not updated it for a while now so I thought it might be possible to duplicate and improve its functionality using Home Assistant. I would be keen to hear what you have done.