Start with one person and a harmless result

A Home Assistant proximity automation can prepare a convenience routine before you enter the home zone. Add the built-in Proximity integration, watch one person’s distance and direction together, and keep a small on/off memory of whether the routine is allowed to fire again. Start by creating a notification inside Home Assistant; connect a real household action only after you understand the observed behavior.

If you only want something to happen after arrival, a Person or zone-entry trigger is simpler. Proximity helps when the distinction between “nearby” and “approaching” matters. Its result describes movement relative to a zone; it cannot know that you are driving home rather than passing a nearby shop. See the Proximity documentation and Person and zone triggers.

Research method: researched from current Home Assistant and Companion App documentation on October 30, 2026. The distances and journey below are teaching examples, not measured GPS performance. This configuration has not been tested on a Tara household installation. The cover is an AI-generated illustration.

1. Check the location input and add Proximity

  1. Use an existing Home Assistant installation and a consenting household member’s phone with the Companion App. Confirm that its location updates while away from home. The phone needs the appropriate location permissions and a working connection back to Home Assistant.
  2. Open Settings → Devices & services → Add integration and choose Proximity. Select your Home zone and one GPS-equipped tracker or Person. A router’s home/away reading alone does not supply coordinates.
  3. Find that tracked person’s Distance and Direction of travel entities. An entity is a named reading or control. Record their actual IDs and the distance unit from Developer tools → States; names vary between installations.

Distance is measured from the edge of the zone and becomes zero inside it. Direction states include towards, away_from, stationary, arrived and unknown. The configured tolerance distance is always in meters; it filters small GPS changes when calculating direction. It does not create the two arrival/rearm boundaries used below.

Use the same person’s two readings. A nearest-person distance can remain zero because a partner is home, masking your approach. If the underlying phone or Person is stuck, follow the existing Person tracking troubleshooting guide before changing this routine.

Agree who will be tracked and who can view their location. Proximity calculates inside Home Assistant, but the phone sends location through your configured connection, directly or through Home Assistant Cloud. It still needs to reach the server while away. The Companion location documentation explains that path and background updates; this is not a promise of a wholly offline location system.

2. Choose an approach distance and a rearm distance

For the worked example, use an inner boundary of 1,000 meters and an outer boundary of 2,000 meters. These are deliberately separated teaching values. Choose distances that fit your journeys after observing your phone; no particular radius guarantees timely or accurate reporting.

  • Beyond 2,000 m: set a helper called Approach ready on. A helper is a value stored inside Home Assistant; here it remembers eligibility.
  • Between 0 and 1,000 m, travelling towards home: if that helper is on, turn it off and create one notification.
  • Arrived: turn the helper off even if no approach notification occurred. This clears unused eligibility after a missed approach.

A short trip that never exceeds the outer boundary deliberately does not become eligible. A large GPS error can still cross both boundaries, so this is a repeat guard, not proof of a real journey. For explicit “I am coming home” intent, use a deliberate phone widget button instead.

The example checks current conditions whenever either input changes. That avoids relying solely on a numeric threshold crossing: if distance crosses first while direction still says stationary, a later direction change needs its own trigger.

3. Build the rehearsal with three helpers

Before attaching a real phone, go to Settings → Devices & services → Helpers → Create helper. Create these controls and check their entity IDs:

  • Number: Approach test distance; minimum 0, maximum 5000, step 100, unit m. Use input_number.approach_test_distance.
  • Dropdown: Approach test direction; options stationary, away_from, towards, arrived and unknown. Use input_select.approach_test_direction.
  • Toggle: Approach ready; use input_boolean.approach_ready. Set it off now and retain its default restore-previous-state behavior. In releases with a startup option, check that it still says to restore the previous state.

If Home Assistant adds a suffix to an ID, substitute your actual ID throughout the example. These number, dropdown and toggle helpers need no physical sensor or custom integration. Open their controls from the Helpers list or add them to an editable dashboard.

Create a new empty automation in Settings → Automations & scenes. Open its menu, choose Edit in YAML, replace the empty automation with the following, and save. YAML is the text form of the automation editor. Paste this as one automation, not into the main configuration file. Menu wording can vary by release.

On a phone, scroll the code sideways to read long lines. You can collapse the example with its heading.

Notification-only rehearsal automation
alias: Approach home - notification rehearsal
triggers:
  - trigger: state
    entity_id:
      - input_number.approach_test_distance
      - input_select.approach_test_direction
    to: null
conditions: []
actions:
  - choose:
      - alias: Clear eligibility after arrival
        conditions:
          - condition: state
            entity_id: input_select.approach_test_direction
            state: "arrived"
        sequence:
          - action: input_boolean.turn_off
            target:
              entity_id: input_boolean.approach_ready
      - alias: Remember a trip beyond the outer distance
        conditions:
          - condition: numeric_state
            entity_id: input_number.approach_test_distance
            above: 2000
        sequence:
          - action: input_boolean.turn_on
            target:
              entity_id: input_boolean.approach_ready
      - alias: Notify once on the approach
        conditions:
          - condition: state
            entity_id: input_boolean.approach_ready
            state: "on"
          - condition: numeric_state
            entity_id: input_number.approach_test_distance
            above: 0
            below: 1000
          - condition: state
            entity_id: input_select.approach_test_direction
            state: "towards"
        sequence:
          - action: input_boolean.turn_off
            target:
              entity_id: input_boolean.approach_ready
          - action: persistent_notification.create
            data:
              notification_id: approach_home_rehearsal
              title: Approach detected
              message: >-
                The approach rule matched at {{ now().strftime('%H:%M:%S') }}.
                This rehearsal did not operate any device.
mode: queued
max: 10

The state trigger watches both inputs; to: null ignores attribute-only changes. Choose runs the first matching branch. The ready helper prevents another qualifying approach until it is rearmed; Queued mode just keeps overlapping runs in order.

The fixed notification ID updates one notification inside Home Assistant. It is not a phone push alert. Turning the helper off before the action prioritizes avoiding repeats; if the action fails, the example does not retry automatically. Read its trace before rearming manually.

4. Walk through a journey without leaving the house

Set distance to 0, direction to stationary and Approach ready off. Enable the automation. Change the helper controls in the order below, letting each run finish. Do not edit your real tracker’s state or use Run actions as proof that the trigger works.

Expected outcomes for this example. On a phone, scroll the table sideways.

Change the test controlsApproach ready afterwardExpected result
Set direction away_from, then distance 2500OnTrip becomes eligible; no notification.
Set distance 900 while still away_fromOnNo notification: distance alone is insufficient.
Keep 900; change direction to towardsOffOne “Approach detected” notification appears.
Dismiss it; change distance to 700OffNo new notification.
Set away_from, then 1500; set towards, then 900OffNo notification: this loop never reached the outer boundary.
Set away_from, then 2500; set stationary, then 900OnEligible again, but no notification while stationary.
Keep 900; select unknown, then towardsOff after towardsUnknown does not match; towards creates the next notification.
Set away_from, then 2500; set distance 0, then arrivedOffArrival clears eligibility without a pre-arrival notification.

Open the automation’s Traces to check which branch ran. The notification timestamp should change only on qualifying approaches. The automation troubleshooting documentation explains why running actions manually does not test the trigger.

5. Connect the real sensors, keeping the harmless action

  1. Disable the rehearsal automation. Replace every occurrence of the test number ID with your person’s Proximity Distance ID, and every occurrence of the test dropdown ID with that person’s Direction of travel ID. Keep the ready toggle.
  2. Match the distance unit. The generic numeric conditions compare numbers, not converted lengths. For kilometers use 1 and 2; for miles use approximately 0.62 and 1.24; for feet use approximately 3281 and 6562. Retain above: 0. Recheck thresholds if you change the sensor’s display unit later.
  3. Set Approach ready off, rename the automation, enable it and observe an ordinary trip. It first needs to receive a qualifying update beyond the outer boundary. Review readings and traces after parking or after the trip; do not watch your phone while driving.

Numeric conditions use strict boundaries: exactly 1000 is not below 1000, and exactly 2000 is not above 2000. Missing or nonnumeric distance cannot satisfy these checks; the example never replaces a missing reading with zero.

After a restart, the toggle can restore its previous state, but an interrupted action does not resume. This example waits for input state changes and has no catch-up promise. A phone that jumps from far away straight to arrived will clear the flag without a pre-arrival alert. If you need an arrival fallback, design that separately.

Once notification behavior is acceptable, a nonessential lamp is a reasonable next experiment. Add a darkness check inside the approach branch so rearming and arrival cleanup still work by day. Keep an ordinary control and decide how the lamp will turn off. For a multi-room setup, Tara’s home automation kit planning covers the broader routine and handoff decisions.

If the result differs

  • Distance never changes: check phone reporting, coordinates and remote connectivity first. Proximity cannot repair a missing location update.
  • It misses you while someone else is home: check that you selected per-person sensors, not the household nearest sensors.
  • It alerts on short local loops: inspect whether the outer boundary was crossed, the toggle was manually enabled, or another automation changes it. Larger GPS jumps can defeat the guard.
  • It never alerts after setup: check the actual unit, entity IDs, exact towards state and whether a far-enough update ever armed the flag.
  • It alerts while you pass nearby: that can satisfy the rule correctly. Use explicit intent or a manual button when a false activation would matter.

Frequently asked questions

Is tolerance the same as the rearm distance?

No. Proximity tolerance filters GPS changes for the direction calculation. The ready helper and separate outer boundary are choices in this automation for limiting repeated actions.

Can I use it to unlock a door?

Do not treat this example as an access-control decision. It does not verify identity, intent or fresh accurate position. Keep unlocking deliberate and use proximity only for low-impact convenience.

Can two people share this automation?

Give each person their own sensor pair and ready helper if each approach should qualify independently. Decide separately whether the final household action should run again when the second person arrives.