this is my first post in this community, please forgive me if I inadvertently break any protocol.
I have realized an alarm system based on a esp32 board (olimex esp32-poe-iso) and the Alarmo integration on HA. I have several wired sensors for doors and windows. I have noticed that one of these (always the same one) is giving me a few false alarms (average 1-2 per week).
The problem comes from an erratic indication that sends an “open” state just for a fraction of a second and then goes back to “closed”. In fact the two events are logged in the same second.
I will check the connections, but for now I have implemented a walk-around via an automation.
I have created an automation triggered when there is a change in the state of the sensor for at least one full second. The automation then sets the value of a boolean helper. The helper, therefore, mimics the value of the sensor but ignores the erratic data.
So far so good, but I cannot use an helper as a sensor in Alarmo, therefore I had to create a template binary sensor that gets its value from the helper. This template sensor has been added to Alarmo, instead of the original unreliable sensor.
It works, but it looks to me a little too complicated, since I have to use 3 entities to do the job.
Is there a more efficient way to do it?
Thank you in advance.