Have been searching for days now but can't seem to find a node that fits my needs. So I am about to write a function instead. But then I thought that I can't be the only one in need of this function. So is there node that I cant find that works like this:
Two inputs, one output.
The first input is simply for switching the flow on and off.
The second input just passes the message through to the output.
So for example if a message is sent to the first input with payload "off" then all messages to the second input will be dropped, until a message sent to the first input with payload "on". Then all messages will be just passed on to the output.
That is what I'm writing in a function right now. And of course I could use both your examples instead.
Just thought it would be more intuitive with the node I tried to describe.
There are contrib nodes already - such as the simple-gate node that do a similar thing. Personally I think the approach with the core nodes is simple enough.
The key thing to remember is nodes only have one input.