Button in position A take way A

Hi All,

In fist time i wish you a very happy New year !

I'm here because i've a question about node red.

I use a button with 2 positions : left position "short" and right position "long"

I made 2 Flow, 1 Flow with short Flow and and other with long Flow.

I don't know make this system. When the button is short position, take short way. And when the button is in long position go to the long way.

I tried to use Switch, or change but is not correct.

How do you do make this ?

Thanks in advance.

Store the position of the switch in a flow variable (use a change node to set flow.switch to value of msg.payload)

Then use a switch node with 2 entries that check the value of flow.switch

If you are just learning node-red, I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Thanks a lot Steve-Mcl,

Now it's work.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.