Reputation: 5
I want to control the brightness of my LIFX bulb by injecting the value of a slider on my NodeRed Dashboard into the node-red-contrib-lifx-api
node.
I managed to control the light if I am using fixed values but somehow it won't take the msg.payload parameter. Also, no error message is shown on the debug stream.
my flow looks like this:
Is {{msg.payload}}
the right syntax to use in this field? the double brackets {{
are working on my other nodes so I am using them here too.
Upvotes: 0
Views: 305
Reputation: 59668
Nodes need to be explicitly built to support pulling values in from the input message. Most of them do not use mustache ({{}}
) syntax, the preferred way to do it if supported is to leave that value empty in the config dialogue (if you set a value it should not be overriden by an incoming message) and where the values come from in msg
should be documented in the info side bar.
Looking at the src for the node it looks like it will take the brightness from msg.brightness
so you probably want to use a change node to move the value from msg.payload
to msg.brightness
before the set-state node.
Upvotes: 0