Filtering spurious quick changes

I installed a RatGDO garage door opener that talks to Home Assistant with MQTT. It’s more reliable than my old MyQ gateway except for one problem. A few times per week it reports that the door has opened, and then 1 second later it reports closed. The door isn’t actually moving. The developer of RatGDO, Paul, says this bad signal is coming from the Liftmaster opener itself.
Does Home Assistant have any way to filter brief state changes like this? I’d like to delay any state changes from this device for 2 seconds, and if it returns to its previous state within that time then ignore it.

Are you using mqtt discovery or is the cover manually defined in yaml?

My question is: why does it matter that it is reported incorrectly for 1 second? Is it triggering an automation? If so, just put a qualifier on the automation so it doesn’t trigger until the door has been open for 3-4 seconds instead of firing immediately. That’s how I deal with nonsense data like this. I get it from all over the place. Rather than fight the data, I control what I can control, which is how I react to it and use it.

Not sure if something here will help Filter - Home Assistant

You can create a input boolean to hold filtered state and have an automation to control it’s state if garage door is open for 2 seconds, turn it on, if garage door is off, turn it off.

You can then use this input boolean to define a template cover.

I expose the cover to HomeKit so it makes notifications on my iPhone and Apple TV. I suppose I could rebuild this functionality with an automation though…

MQTT discovery