Hi all,
I am trying to debounce a sensor in nodered with limited success.
My project uses a reed switch (magnetic sensor) to establish when my robot lawnmower is in the docking station.
This is done over mqtt and captured in HA as a binary sensor and works great. I have “on” for when the lawnmower is active on the lawn and “off” for when it is docked.
Now unfortunately there is a slight wobble on the body of the mower when it docks causing it to announce “on” “off” “on” “off” “on” “off” when it arrives (and sometimes when it leaves).
I stopped the message notifying numerous times to my phone with a delay node that waits until the messages are a rate of 1 per 4 seconds and then drops the intermediate messages.
But now i need to prevent the “on” being announced at all when it comes back to the dock.
Is there a way to perhaps wait until it is in one state for a set amount of time before announcing? 3 seconds or so would do it.
any help gratefully received!