node-red-contrib-toggle-opposite 1.1.2

Toggle to the opposite state for common values (On/Off, Muted/Unmuted, booleans, 0/1, etc.)

npm install node-red-contrib-toggle-opposite

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:

  • truefalse
  • falsetrue
  • "on""off"
  • "enabled""disabled"
  • "muted""unmuted"
  • 10

If the input value is not recognized, it is passed through unchanged.

Usage

  1. Drag the Toggle Opposite node into your flow.
  2. Connect it to any node that sends a payload.
  3. 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

Node Info

Version: 1.1.2
Updated 3 hours ago
License: MIT
Rating: not yet rated

Categories

Actions

Rate:

Downloads

0 in the last week

Nodes

  • toggle-opposite

Keywords

  • node-red

Maintainers