I do have an automationo, whis is based on a sensor that needs about a 0.5s debounce for it to not generate spurious false triggering on other automation.
Currently I have something like that:
Sorry to repeat myself …learning moment… what / why is the use case? Seeing that HA has challenges in situations with dozens of entities, is HA reliable ?
EDIT: HA issues > environment in which HA runs issues… if HA env. and HA cannot hanlde this frequent changes I mean
Sure.
Mailbox (European style) with two door (magnetic proximity) sensors.
Automation “New Mail”: magnet stuck on top flap (left side), sensor housing on the left side of the main mailbox body. Triggers whenever the flap opens (magnet moving away from the sensor), AND the door is closed.
Automation “Clear”: Magnet stuck on door (bottom left), with the sensor housing also on the left wall of the left side of the body. Triggers (i.e. clears the “New Mail” flag) when the door opens.
Unfortunately, as the door opens, the magnet from the flap also moves away from the sensor, resulting in a race condition: If the flap sensor triggers before the door sensor, a new trigger of “new mail” is set, even though all of them are cleared immediately as the door opens.
Thats my reason for the 1s debounce, but thats right at the edge what some (“seasoned”) mailmen can drop a letter in the box. So I may miss the new mail trigger.
Got it… thanks and this really makes it life-like. As mentioned I have no solution for this setup, beyond my tehc. knowledge. Side info: my mailbox is equiped with a vibration sensor which is usually fine…as long as there is a storm …about 10 times a year false notif.
I think what you need is to respond immediately, but do not trigger again for at least a second after that. If that is what you need, the simplest solution is: do not use for: and make sure the automation mode is single. then add a delay of one second at the end of the automation.
That way all consecutive triggers within the first second are blocked because the automation is already running. (there are other ways, but this way it can be done without using templates, just using the automation editor).
I think I understand. You don’t want ha to say there is new mail when you open the door to collect mail but opening door sets off the reed switch that indicates there is new mail. What about having a condition that door is closed when mail slot is opened before it will indicate new mail
What if when mail sensor fires you set an action to delay 1 second then if door sensor is closed you set that as condition and only then send notification.
Or make automation if door opens it disables mail automation for 30 seconds then turns mail automation back on by which time door is closed.
Completely different solution, but I use a helper to keep track of whether we’ve gotten mail yet for the day and then reset it every night. Keeps it from getting triggered when I actually get the mail as well as wind/weather.