node-red-contrib-toggle-opposite 1.1.2
Toggle to the opposite state for common values (On/Off, Muted/Unmuted, booleans, 0/1, etc.)
node-red-contrib-toggle-opposite
A Node-RED node that toggles common values to their opposite state.
Description
This node receives an input value and outputs its opposite value when possible.
Supported conversions include:
true→falsefalse→true"on"↔"off""enabled"↔"disabled""muted"↔"unmuted"1↔0
If the input value is not recognized, it is passed through unchanged.
Usage
- Drag the Toggle Opposite node into your flow.
- Connect it to any node that sends a payload.
- The node will output the opposite value of
msg.payload.
Inputs
msg.payload
The value to toggle.
Outputs
msg.payload
The toggled value.
Author
Thenocaster
License
MIT