You can also set the update interval to “never” to disable time based updates.
Then you can use a moving median to smooth noise. Manually request updates 10 times in a repeat like you’ve done and then push it out every 10th value.
Then use the result to feed a binary sensor (detected/not detected).
Have a look at some of my WIP config here, I’m doing something similar.