andreypopov / node-red-contrib-zigbee2mqtt

Zigbee2mqtt connectivity nodes for node-red
GNU General Public License v3.0
92 stars 24 forks source link

Changing the color using the predifine command and passing the command in the msg gives different results #129

Open hectorzeta opened 1 month ago

hectorzeta commented 1 month ago

Hi all,

I am having difficulties to get my node working. I have a function node that is converting a user request from Alexa request to the a zigbee2mqtt request. In general it is working. Was this does is setting the msg.command and msg.payload with properly and then this is passed to an out node.

But for the color command I somehow do not get it to work. I am passing for example payload {"hue":240,"saturation":100}. When I used the predefined command Color:{} from the dropdown list it works.

msg.payload={"hue":240,"saturation":100} image

but when I use the option to pass the command via msg.command and the same payload the color is not changed. msg.command=color msg.payload={"hue":240,"saturation":100} image

using the approach to change the state, color_temp, or brightness works fine. Only with the color command I am having this problem.

What is the command value I should use to achieve this same result when passing the command via msg.command

I hope I have managed to explain my problem in a way you can easily understand it.