Conditional delay

Good morning, something that I miss and that would be good for certain automations, such as the simulation of presence, would be a type of delay in which a lower and a higher time band is indicated and the system by itself would choose a time intermediate, within those bands, different each time the automation was executed.

a greeting

This can be achieved with a delay I think:
example with a min of 1 and a max of 51 minutes but you can also have “seconds” or “hours” :

- delay:
      minutes: {{ range(1, 51) | random }}

You can also use template to define the range:
example to have a random number beween 1 and the number of seconds since HA started:

{{ range (1,((as_timestamp(now()) | int(default=0)) - (as_timestamp(states('sensor.uptime')) | int(default=0)))) | random  }}