spookylights:
alias: Continuous Spooky Light Flicker
sequence:
- repeat:
while:
- condition: time
after: '16:00:00'
before: '22:00:00'
sequence:
- repeat:
count: '{{ range(5, 15) | random }}'
sequence:
- target:
entity_id: switch.udendors_lyskaede_plug
action: switch.turn_off
- delay:
milliseconds: '{{ range(300, 500) | random }}'
- target:
entity_id: switch.udendors_lyskaede_plug
action: switch.turn_on
data: {}
- delay:
milliseconds: '{{ range(300, 1000) | random }}'
- delay:
seconds: '{{ range(15, 30) | random }}'
- target:
entity_id: switch.udendors_lyskaede_plug
action: switch.turn_on
mode: restart
description: ''