HX711 filtering with 1 to 2 wrong values

So I have an HX711 load cell amplifier under my bed and they work great for detecting if someone is in bed, only problem is that when I turn around in bed, the output sometimes goes to 0kg for 2-4 seconds (1-2 measurements).

How can I filter out those 1-2 values and pass trough the value if the values persist (when I really get out of bed)?

Have a read here:

I use the sliding_window_moving_average, works great

Yeah I was kinda thinking of that, but with a small window the wrong values aren’t completely filtered out (it reports 20kg for example) and if you take a large window the response when you get out of bed is quite slow. What I really want is for the wrong samples to be completely blocked. I guess this is the best solution for esphome. Anyways I implemented it and it works good enough, thx!