#Ignore state changes for a few seconds

1 messages · Page 1 of 1 (latest)

nimble oasis
#

Hey I have a wireless gate open sensor and it has bounce(?). When the gate opens it will report open then closed then opened, sometimes it does that two times. After that the state would be stabilized. Until the closing when it will report closed then opened than closed and stay that way. Since it’s wireless system from my alarm system, I’ve narrowed down the problem to interference from remotes in the gate. When I put the module a few meters next to the gate it works fine. I only use that for the state in home assistant and HomeKit and it bugs me that it sends a few notifications. I know the best way would be to fix the problem altogether but that’s not viable and would like to ignore the state change for let’s say 5-10seconds

slender bolt
#

Just use the "for" on the state? E.g. closed for 5s

#
entity_id: cover.garage_door
state: closed
for:
  hours: 0
  minutes: 5
  seconds: 0

Like in this example

#

No template needed

bitter spade
#

That will delay the notification with 5 minutes. A shorter for period could work, but an alternative is to add a short delay at the last step of the notification and make sure it's in mode: single. That will prevent a new notification being sent in the delay period

slender bolt
#

This is an example from my setup. Obviously the 5m and the entity_id need to be changed.
Your solution has the potential of missing a state switch if it happens too quickly

waxen garnet
#

As a bonus to the solution from @bitter spade, set max_exceeded: silent as well to not spam the HA log

dreamy stratus
#

nevermind, ignore me