I am trying to use an MQTT switch (Shelly 1) to control some smart bulbs. I previously used the HA entity for the device in Node-Red (MQTT-> HA-> Node-Red) but I am now trying directly from MQTT to Node-Red.
Previously when using monitoring the state HA entity I could choose output only when state changed so if I turned on the smart bulbs from app and the switch stayed in the off position my turn off automation wouldn’t trigger and visa versa if I turned them off from the app. Now with MQTT directly the automation is being triggered every few seconds when the device updates its state.
Is there a way to filter out the updates for only on state change?