Repository navigation
docs(automations): dedup drone_detected against drone_conflict/nearby - #62
Merged
Merged
Conversation
Reported: drone_detected was firing on the same poll as drone_conflict for essentially every close-in drone. Root cause is ordering + geometry, not a bug: tracker.tick() runs _evaluate_alerts() before _publish_summary(), so the alert binary_sensors are already updated in HA by the time nearest_drone's track_id-change trigger fires on the same tick — and a drone flying near the operator's own watchpoint typically satisfies drone_conflict's/drone_nearby's proximity+altitude thresholds the moment it gets its first position fix. Add a condition so drone_detected only fires for drones NOT already covered by drone_conflict/drone_nearby, leaving those to own the close-in case. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rebased onto main after #63 released 1.1.1. This PR originally claimed 1.1.1; that slot is now a released tag, so the docs fix moves to 1.1.2. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ifnull
force-pushed
the
docs/drone-detected-dedup-condition
branch
from
August 30, 2026 23:42
e83b16f to
3aa789f
Compare
This was referenced Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to a real-world report:
drone_detected(example #4) was firing on the same poll asdrone_conflict(example #5) for essentially every close-in drone — read as a duplicate push.Root cause, not a bug:
tracker.tick()runs_evaluate_alerts()before_publish_summary()(tracker.py:220-222), sobinary_sensor.airspace_alert_drone_conflict/_nearbyare already updated in HA by the timesensor.airspace_nearest_drone'strack_id-change trigger fires on the same tick. Combined with geometry — a drone flying near the operator's own watchpoint typically satisfiesdrone_conflict's/drone_nearby's proximity+altitude thresholds the moment it gets its first position fix — the two automations trip together on essentially every close-in detection.Adds a condition to
drone_detectedso it only fires for drones NOT already covered bydrone_conflict/drone_nearby(farther out or higher up), leaving those two to own the close-in case with their richer alert semantics.Docs-only change.
Test plan