Hi, everyone!
I'm pretty new to node-red dashboard and I read in the documentation that in order to disable a widget one must pass a msg.enabled property set to false. I'm trying to have a switch that disables a switch and a button in its off position. I don't know how to go about passing that property to the switch and button nodes.
So I will assume that when the control switch is 'OFF' you want the two other widgets disabled and when it is on, you want them enabled. Try this:
send the output of the switch to a switch
node and check for on and off. Now you will have two outputs. Connect to a change node that changes msg.enabled
to true
or false
and feed that to the two other ui nodes.
1 Like
or set the control switch to send boolean true and false - and then a change node set to move msg.payload to msg.enabled then to the other other nodes
1 Like
@dceejay - Nice!! Much cleaner! (wish I'd thought of it )
Just the ui_switch and a change node instead of my ui_switch to switch to two change nodes and wires all over...