[Postscript: This was solved as having nothing to do with DELAY - see below]
I think I am doing something dumb but just not seeing it. I was mostly playing with lights to see how they look flashing, different delays, to do something with landscape for Halloween. I had a simple script and one light changing colors, with a delay in between each color change.
What happens seems bizarre. The loop appears to run for the appropriate amount of time (sum of delays times 3) then the light turns off, but the color transitions run MANY more times, changing the entire time at what appears to be full speed, flashing through the requested colors. Almost as though there were two parallel loops, one without delay but constrained by the other’s total time.
Am I missing something obvious? sequence steps are… well, sequential, right?
I tried two different format for delay, no change. Probably have some indentation wrong or similar, but…
I’m sorry if this is scripting 101, but my head is tired from banging against this particular wall.
Linwood
PS. This is not intended to be final but rather was just testing to see how the light looked, I’m sure there is a better way to do this overall, but now I really want to understand this loop and why delay does not work.
halloween:
alias: Halloween
sequence:
- repeat:
count: 3
sequence:
- service: light.turn_on
target:
entity_id: light.flood8
data:
brightness: 255
transition: 0
rgb_color:
- 0
- 0
- 255
- delay: '00:00:05'
- service: light.turn_on
target:
entity_id: light.flood8
data:
brightness: 255
transition: 0
rgb_color:
- 0
- 255
- 0
- delay: '00:00:00.1'
- service: light.turn_on
target:
entity_id: light.flood8
data:
brightness: 255
transition: 0
rgb_color:
- 0
- 0
- 255
- delay:
seconds: 10
- service: light.turn_on
target:
entity_id: light.flood8
data:
brightness: 255
transition: 0
rgb_color:
- 255
- 0
- 0
- delay: '00:00:00.1'
- service: light.turn_off
target:
entity_id: light.flood8
mode: single