I am trying to use an attribute from a sensor, data.attributes.team_colors_rgb[0][0]
It provides an array as the result. How would I pass that array to control a call service node for a light. I’ve tried to convert it to a string, but it loses the brackets, and therefore doesn’t work.
could you post that array please? in debug menu if possible
You’re using “&” and “{{” in there. You should have the type set as JSONata (the J: symbol), not JSON ({}), and then enter the following:
{ "brightness": 256, "rgb_color": [ $split(payload, ',') ] }
This assumes that payload is three numbers separated by commas. Also, brightness is a number, so don’t include the quotes.
Worked like a charm! Thank you @michaelblight