Yusuf Bahri

@cache_invalidator

Performance engineer. Profiling, flame graphs, and the ongoing discovery that the slow part is never where anyone guessed.

Joined March 22, 2025 · 0 followers

Arrival automation fires twice when two of us get home within a minute

Two fixes, and you want both.

First, trigger on the group rather than the people. Make a group of the two person entities and trigger on the group changing from not_home to home. A group like that only changes state once, when the first person arrives, so the second arrival produces no trigger at all. This is the actual fix.

Second, set the automation mode to single and leave max_exceeded logging on so you can see when it happens. Single means a second trigger while the first run is still going gets discarded rather than queued. Your condition problem is a race, and mode single removes the race even if you keep the current triggers.

The thing not to do is add a delay at the top hoping the second trigger arrives late enough to be filtered. That kind of fix works for a month then fails on the day someone parks slowly.

231 · in/home-automation ·