Script with action type delay of milliseconds: 500

Hi.
i did a script with action type delay of milliseconds: 500 .
like this:

'1550397082487':
  alias: All light turn off
  sequence:
  - alias: ''
    data:
      entity_id: switch.1000549f32_1
    service: switch.turn_off
  - delay: 'milliseconds: 500'
  - data:
      entity_id: switch.1000549f32_2
    service: switch.turn_off
  - delay: 'milliseconds: 500'
  - data:
      entity_id: switch.1000549f32_3
    service: switch.turn_off
  - delay: 'milliseconds: 500'
  - data:
      entity_id: switch.1000549f32_4
    service: switch.turn_off
  - delay: 'milliseconds: 500'
  - data:
      entity_id: switch.10005b12d7_1
    service: switch.turn_off
  - delay: 'milliseconds: 500'
  - data:
      entity_id: switch.10005b12d7_2
    service: switch.turn_off

but it doesnt work. after the first switch turd off, it’s stop
idea…?

Thanks
Refael

  - delay: 
      milliseconds: 500
1 Like

Thanks.
i try to do it in the script maker but it wont work over there.
i wanted my light to go off 1 by 1 when pushing the “bye bye” batten,
it’s a good effect specially if they go off in some kind of order (back to front for example)
Refael

He said turd.

7 Likes

hello!

is that still working for your scripts?

my script is stopping before this delay

thx

It is supposed to be supported according to the documentation. However like many things written in the docs, it is not necessarily accurate. I found that delays less than a second are entirely dependant on the processor load.

I used this to compensate for a while but it too would occasionally go tits up. I don’t bother any more.

Edit: ah! while milliseconds may be a valid option it is pointless specifying this. Home assistant works on a 1 second resolution for delays in automations and scripts.

2 Likes