node-red-dashboard
node-red-dashboard copied to clipboard
On/Off Payload Swap on Switch component
Description
When using a switch where specifying the ON and OFF payload properties, a common scenario is where logic needs to be inverted. The ON payload may be OFF where the consumer of say an MQTT message interprets OFF as the default on state of a NC relay contact. While it is easy to just change the text for the ON and OFF payloads, when a flow has multiple switches this quickly becomes a chore and a tedious workflow.
Proposal is to have a toggle button which allows the swapping of the ON and OFF payload values.
Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate
That doesn't help if you want true/false, On/Off 1/0 or something else. The vast majority of the systems I have built don't use ON/OFF.
I think the proposal here is simpler than you're interpretation @colinl.
I think the request is just a button in the node's editor that switches the values in that editor.
@joepavitt Yes, this is purely a time saving suggestion. A bigger picture view might be the ability to select a set of like nodes and make property changes to them all. These don't seem important until you have flows with plenty of nodes and want to refactor. I'm often stuck with this task and its always tedious. Let's make the easy things easy or even easier.