A universal MQTT switch subflow for Shelly, OpenBeken, and legacy devices
npm install node-red-contrib-universal-mqtt-switchA robust, "set-and-forget" Node-RED subflow for controlling nearly any MQTT-enabled switch. Perfect for mixing old Shelly Gen 1 hardware with newer OpenBeken or Tasmota devices in Dashboard 2.0.
true/false booleans.on/off) or integer (1/0) based on your config.~/.node-red):``bash
npm install node-red-contrib-universal-mqtt-switch
REMEMBER: if you wire a Dashboard 2.0 Switch to this node - to prevent command loops wire the first output of this node to the input of your Dashboard 2.0 Switch to keep its state synchronized, but ENSURE the Dashboard Switch node does pass input messages to its output (that checkbox is off by default usually and should stay that way.)
/ "off" |
| Tasmota | Checked (True) | "ON" / "OFF" |
| OpenBeken | Unchecked (False) | 1 / 0 |
| Home Assistant | Unchecked (False) | 1 / 0` |