Hi There,
I am a bit new to coding with the function-node. What I am trying to do:
I have Philips Hue lights and LIFX lights.
When I change the color of the Philips lights, I want to send this to the Lifx lights to change in the same colour.
The output of Philips is done by an array (if I'm right), like this:
payload:
0 : 255
1 : 255
2 : 255
I need to change this format to just be comma-seperated like:
payload: 255,255,255
I made the following function-node:
var red = msg.payload[0]
var green = msg.payload[1]
var blue = msg.payload[2]
return [ red, green, blue ];
But it's still returning as:
payload:
0 : 255
1 : 255
2 : 255
How can I change this?
Please help me out, thanks!