Automation GUI time helpers or pause time templates

I am trying to figure out the syntax of the time helpers or pause time templates in the GUI for creating automations.

I have tried

minutes: '{{ range(2, 36) | random }}'
'{{ (range(4, 6)|random|int) }}:00'

etc., but nothing seems to work.

Could somebody guide me?

I’m guessing that’s https://www.home-assistant.io/docs/scripts/#wait-template and you actually want to be using https://www.home-assistant.io/docs/scripts/#delay

Hm, yes, and I want to use a random delay, but my automation with these templates does nothing.

Edit: Got it now, need to do these templates in a script and then call_service script from my automation.

Nope. Automation actions and script sequences use identical syntax. You had something else wrong.

Strange, couldn’t get it to work with templates in Automation actions. I think I put the exact same thing in a script and it worked, so I guess I will stay at that.