To be clear, I suspect the snapshot is taking longer than the 5 seconds you are giving it to finish. Try increasing the delay after the camera.snapshot
service call.
And, BTW, you can write the delay like this:
- delay: 10
If you just give a number it is interpreted as seconds.
EDIT: Although, by the looks of it, I’m guessing you’ve created the script in the UI editor.