Trigger automation for a period of time

I have a script that turns on all my lights when my alarm is triggered:

Call Service
switch.turn_on
entity_id: group.all_int_ext_lights

I would like to switch them on and off (once every 3 seconds for 10 minutes for example)
Is that supported and if yes how is it set up?
Thanks

There is no built-in function like you ask for. HA smallest time interval is one second. You can basically create a timing loop utilizing two scripts but the results are less than you would hope for. Basically the way it would work is your automation would call the first script. It would turn the lights on, delay and then call the second script which would turn the lights off delay and call the first script again. It kind of works. Of course you would need a way of stopping the loop as well. You can search the forum and find implementation examples.

Ok thank you, I was wondering if there was some way of doing it via the automation menu that I wasn’t seeing