Node Red - Flux LED set Zone call "Colors"

Having trouble with the set zone call in Node Red for Hassio.

Out of the box the “fill example data” which is this:

{
   "colors":"- [255,0,0]\n- [0,255,0]\n- [0,0,255]\n- [255,255,255]\n",
   "speed_pct":80,
   "effect":"running_water"
}

Returns the following error

"Call-service error. None @ data['colors'][0]"

Okay what am I missing here? Below is how I would call it from Home Assistant

service: flux_led.set_zones
target:
  entity_id:
    - light.addressable_led
data:
  speed_pct: 50
  effect: running_water
  colors:
    - - 255
      - 0
      - 0
    - - 0
      - 255
      - 0
    - - 0
      - 0
      - 255
    - - 255
      - 255
      - 255

You just only done half of it.
Yoy have converted the minuses from the RGB value sets to [ ] in node red, but you have not done the same for the entire list set.

You have converted

- 255
- 0
- 0

into

[255,0.0]

and the same for the rest of the RGB sets.
Your list now looks like this

- [255,0,0]
- [0,255,0]
- [0,0,255]
- [255,255,255]

You just need to do the same conversion to get the next set of minuses removed.

Does that mean this line:

"colors":"- [255,0,0]\n- [0,255,0]\n- [0,0,255]\n- [255,255,255]\n"

Only takes care of the “first color” and since I need to have 3 color’s sent that I need to basically extend that line of text for 2 additional colors? (like below)

"colors":"- [255,0,0]\n- [0,255,0]\n- [0,0,255]\n- [255,255,255]\n - [255,0,0]\n- [0,255,0]\n- [0,0,255]\n- [255,255,255]\n - [255,0,0]\n- [0,255,0]\n- [0,0,255]\n- [255,255,255]\n"

When you see minuses in HA, then it means it is elements in list ordered one under the next with each line with a minus at the same indentation showing the next element.

Lists in Node-Red is put inside [ ] and elements are separated with comma.

You have here a list with elements that are lists too.
The lists inside the elements you have concerted correct to [R,G,B] and you now need to do that with the next one to get [ [R,G,B], [R,G,B], …]

You have to do the editing yourself, since I am on a phone and code examples are hard to do. :wink:

Thank you - Figured it out with that last example. Much appreciated

{
    "colors": [
        [
            255,
            0,
            0
        ],
        [
            0,
            255,
            0
        ],
        [
            0,
            0,
            255
        ]
    ],
    "speed_pct": 50,
    "effect": "running_water"
}