Issues with Random delay

Hi all,
Ive been using an Automation for some time with a Random delay with no problems (see below )I decide to use the same delay in other Automations for other lights using Sun set as the trigger, but they dont work only one for the Automation works. When I look at the trace of the Automations that hang it shows the Delay as a value but the Automation doesnt progress , any ideas what im doing wrong

alias: 4.0 Sunset_Porch_light
description: ''
trigger:
  - platform: sun
    event: sunset
    id: sun
condition:
  - condition: time
    after: '15:00:00'
    before: '20:45:00'
action:
  - delay: '{{ range(1800, 3600)|random }}'
  - type: turn_on
    device_id: 39ee81628d456aa32342e4f9cc4ee1ea
    entity_id: switch.porch_light
    domain: switch
mode: single

Well, do you mean it doesn’t progress after 1h (the max of the delay)?
Not really sure of the point of lighting up your porch at a random time after sunset, tbh. Occupancy simulation?

Hi Yes its for Occupancy simulation,
and yes one of the scripts will work and the other 2 stall with in the delay timer