I have a garage door that reports the following “trigger” sequence when opening: closed opening opening ... opening open
A similar thing happens when closing: open closing closing ... closing closed
Those “opening” and “closing” triggers repeat many times in the 10-12 seconds that the door is in motion.
I initially tried an automation that triggers on any change and did 4 options, one for each trigger type. This resulted in the last triggered action being the one for “opening” (or “closing”), which happened many times, but missing the end state entirely. I figured that maybe the automation was bogged down with all the transition triggers that it misses the final “steady state” one.
So I changed the “opening” one to detect if the previous trigger was “closed” which should only happen once. Unfortunately, now the “the opening” part always seems to get ignored.
Not sure what’s wrong - maybe the template is not correct?
Or I’m approaching this entirely the wrong way?
Here’s my test automation, with just an “opening” option included for now to test the idea.
Maybe there is extra states you do not see, because it goes too fast.
Try the event tab in the developer tools and then listen for the events related to the garage door.
You might have to listen to * if you do not know what filter to use to get a better capture.
The * will capture a lot, so maybe get the first event and then see if you can filter it better.
Tried that. I see several events where the state was old: closing to new:closing, and then followed by a old:closing, new:closed.
I didn’t capture a old:open, new:closing - think I ran out of space for the events display.
But only the closing->closed seems to have run in the automation.
I’ll try again, but I’m pretty sure I know what they are. It’s a cover, so “open”, “closed”, “opening”, “closing” are the states I’m looking for in the triggers. I’m seen all of these, but haven’t actually seen the “closed”->“opening” transition yet.
I’m definitely getting all the states I’m looking for. But I think that the flood of “opening” and “closing” repeating states is somehow overwhelming the automation. That sounds odd to me, but I decided to take an apporach similar to that suggested in other posts - use input_boolean helpers, one for opening and one for closing, to indicate movement. This seems to work well (as far as I can tell so far).