Create todo via automation with due date of tomorrow or later

I want to generate todo’s based on an event, but with a due date of tomorrow or the day after tomorrow.

I find myself stuck how to populate the due date field. I am creating an automation service call. I have tried the following, but it isn’t working.

service: todo.add_item
metadata: {}
  item: Test Item
  due_date: {{ (as_timestamp(now())+ (86400)) | timestamp_custom("%Y""-""%m""-""%d") }}
  entity_id: todo.inbox

If I try {{(as_timestamp(now())+ (86400)) | timestamp_custom("%Y""-""%m""-""%d")}} I get the result I expect, but when I try to execute the automation I get the following error

Not a parseable type for dictionary value @ data['due_date']. Got None

Can somebody point me in the right direction?


 due_date: "{{ (now() + timedelta(days=1)).strftime('%Y-%m-%d') }}"
1 Like

Thank you! It works instantly - much appreciated!