Add day to now() and present it nicely in an automation

I want to pass the time and date one day from now to a webhooks at IFTTT.
But the time syntax got me pulling my hair out. My brains are scrambled from trying to understand all this, so forgive if I don’t make any sense.
It’s similar to How to send date and time to IFTTT but I want to add one day to that time.
It must be in a special format (YYYY-MM-DD HH:MM).
All the commented stuff is stuff i tried but to no avail.

    - data_template:
      event: iftttwebhooks1
      value1: #{% set adayahead = as_timestamp(now()) + 86400 %} {{ strptime(adayahead, "%Y-%m-%d %H:%M") }}
      # {{ strftime({as_timestamp(now()) + 86400}, "%Y-%m-%d %H:%M") }}
      # {{ as_timestamp(now()) | float + 86400}}
      # {{ datetime.strptime(now().strftime("%Y-%m-%d %H:%M"), "%Y-%m-%d %H:%M") +  }}
      # {{ strptime(now().timedelta(days=1).strftime("%Y-%m-%d %H:%M"), "%H:%M") + datetime.timedelta(days=10) }}
      # {{ as_timestamp(now()) | float + 86400 | timestamp_local).strftime("%Y-%m-%d %H:%M") }}
      service: ifttt.trigger

Hi @KillahW, found this topic about your problem.

1 Like

Thank you very much! I didn’t find that topic when I searched.

{{ (as_timestamp(now()) + (24*3600)) | timestamp_custom(’%Y-%m-%d %H:%M’, True) }}
worked for me.

2 Likes