Subtracting time in an automation

Hello, I am using this data in my automation to send a notification to my phone for my reolink camera:

service: notify.mobile_app_<your_device_id_here>
data:
  message: This message will open Camera 8 on Reolink app
  data:
    priority: high
    ttl: 0
    clickAction: >-
 intent://scan/#Intent;scheme=reolink;package=com.mcu.reolink;action=android.intent.action.VIEW;S.UID=998877AABBCC;S.DEVNAME=MyNvr;S.ALMTYPE=PEOPLE;S.ALMCHN=256;S.ALMTIME={{now().isoformat()}};S.ALMNAME=Detection;end

It works fine and takes me to the time of the recording of when the notification occurred. What I would like to do is to change the now() time to be 5 second prior but I have not been able to figure out how to do that. Any ideas?

Thanks

You can use the timedelta function

{{ (now() - timedelta(seconds=5)).isoformat()}}

That’s what I needed. Thank you!