Use an automation to send a message when a number of days has passed

Since I’m not very good at ‘programming’, I turn to you for help. I looked at numerous topics and video’s, but none of them address my exact question.

I have some tiles with chores that change color when I leave them alone for too long. Now I also want a message when a certain numbers of days has passed.

I have an input_datetime.do_something helper (so this is the last time I did it), and if this date is 15 days in the past, I want to notify myself.

I made an automation that triggers each day at 19:00, and I tried to make it check the number of days passed, but I can’t get it to work.

I’m absolutely no programmer, and I’m thrilled each time I get something to work in home assistant, but if I need to code a lot, it gets much harder for me. If the solution uses Node Red, that is also fine be me.

Thanks in advance for your help.

alias: example 777
  - platform: time
    at: '19:00'
  - condition: template
    value_template: "{{ now() - states('input_datetime.do_something') | as_datetime | as_local == timedelta(days=15) }}"
  ... etc ...

If you want it to keep reminding you beyond 15 days, change == to >= in the template.

1 Like

Thank you so much for your swift reply,

Exactly what I needed, and it works.

1 Like

I found that template useful for something similar. Thanks.