Created
December 16, 2021 15:52
-
-
Save thejeffreystone/6bc41eb103094318795353ab2885abf3 to your computer and use it in GitHub Desktop.
Home Assistant - Randomized Lights Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
randomize_lights: | |
alias: randomize lights | |
sequence: | |
- repeat: | |
count: '8' | |
sequence: | |
- service: homeassistant.turn_on | |
data: | |
entity_id: "{{ expand('group.livingroom') | selectattr('state', 'eq', 'off') | map(attribute='entity_id') | list | random }}" | |
- delay: | |
seconds: '{{ range(2,5) | random | int }}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment