I am getting a configuration issue with a script in my scripts.yaml. It is not being loaded into the scripts list but I cannot see an obvious issue. It is almost identical to a script written by another devloper at [Home Assistant Rainbow Loop with Ikea Tradfri RGB light · GitHub]. What this does is allow an automation to scroll through a list of colours and tur on a light with each color value.
In fact, I have simply taken this and used rgb values where it was originally xy colour coordinates.
My code is below:
sufclight:
alias: sufc light
mode: single
fields:
entity:
description: The entity that will be faded through
example: light.hue_lightstrip
variables:
colors: |-
{{ [[237, 28, 36], [238, 41, 48], [239, 53, 60], [240, 66, 72], [241, 78, 85], [242, 91, 97], [243, 104, 109], [244, 116, 121],
[245, 129, 133], [246, 141, 145], [247, 154, 158], [248, 167, 170], [249, 179, 182], [250, 192, 194], [251, 205, 206],
[252, 217, 218], [253, 230, 231], [254, 242 243], [255, 255 255], [254, 242 243], [253, 230, 231], [252, 217, 218],
[251, 205, 206], [250, 192, 194], [249, 179, 182], [248, 167, 170], [247, 154, 158], [246, 141, 145], [245, 129, 133],
[244, 116, 121], [243, 104, 109], [242, 91, 97], [241, 78, 85], [240, 66, 72], [239, 53, 60], [238, 41, 48]] }}
sequence:
- service: light.turn_on
data_template:
rgb_color: |
{{ colors[(now().second/3.5)|round(0)] }}
transition: 1
entity_id: '{{ entity }}'
What mistake have I made?