I'm wondering how forwardInputMessages in a UI node works.
The dashboard Switch-node has following setting:
By looking at the Switch-node (code), it is being used like this:
forwardInputMessages: config.passthru,
But when I use it like that in the node-red-contrib-ui-multistate-switch node, then it works like this:
If true then all messages will be passed through
if false then no messages will be passed through
However for case 1 I had expected the passthrough only to happen when the payload triggers a new state? But now the msg is also passed through when the switch doesn't change state...
I don't see anything extra that I should do to make it behave like that...
The config text and the help text for the ui_switch are misleading. It either passes through or it doesn't. Simple as that. In addition, If the payload matches one of the switch states, then it sets the switch, if not it doesn't set the switch.
Ah yes, what I said is not quite true. When in non-pass through mode, if the node is set to Show State of Output then the incoming message does not set the state of the switch, but may affect other attributes of the switch.