I have 9 hue bulbs in a chandelier. I want to setup some simple color sequences.
The script works fine when call the script as follows, and hard-code rgb_color: [0,255,255]
.
service: script.light_sequence
data:
light_group: light.dining_room
delay: 0.2
transition: 5
script:
light_sequence:
mode: restart
sequence:
- repeat:
count: "{{ state_attr(light_group,'entity_id')|count }}"
sequence:
- service: light.turn_on
data_template:
brightness: 255
entity_id: "{{ state_attr(light_group,'entity_id')[repeat.index-1] }}"
rgb_color: [0,255,255]
transition: "{{ transition|default(5) }}"
- delay: "{{ delay|default(0.2) }}"
But, if I try to pass a sequence of color sequences as follows, the script throws the following error:
None for dictionary value @ data['rgb_color']
light_group: light.dining_room
delay: 0.2
transition: 5
colors:
- [255,255,0]
- [255,0,255]
- [0,255,255]
- [0,0,255]
- [0,255,0]
- [255,0,0]
- [255,255,0]
- [255,0,255]
- [0,255,255]
#rgb_color: [0,255,255]
rgb_color: "{{ colors[repeat.index-1] }}"
It seems like this should work. What am I missing?