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:

  • true → false
  • false → true
  • "on" ↔ "off"
  • "enabled" ↔ "disabled"
  • "muted" ↔ "unmuted"
  • 1 ↔ 0

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 9 months, 2 weeks ago
License: MIT
Rating: 0.0

Categories

Actions

Rate:

Downloads

0 in the last week

Nodes

  • toggle-opposite

Keywords

  • node-red

Maintainers