Smart Home Assistant

Home Assistant Device Tracker: Setup Guide for GPS, Wi-Fi and Router Tracking

SepehrBy Sepehr· 7 August 2026· Updated 7 August 2026· 6 min read
✓ Independent — no paid placements✓ UK-tested in real homes✓ Cited sources on every guide
Home Assistant Device Tracker: Setup Guide for GPS, Wi-Fi and Router Tracking
On this page[tap to expand]
Buy the picks in this guide

Recommended for Home Automation

See all devices →

The device_tracker integration is the piece of Home Assistant that turns a phone, laptop, or Wi-Fi connection into a home / not_home signal you can automate on. It's the low-level building block behind every presence automation — the light that turns on when you arrive, the heating that drops when everyone leaves — and it's configured differently depending on which platform is feeding it: your phone's GPS, your router's connection list, or a direct network scan.

This guide walks through configuring the three most common device_tracker platforms — the Companion app (GPS), Nmap Tracker (network scanning), and Ping (ICMP) — plus what's changing with the older YAML-based trackers. For a broader comparison of presence-detection strategies, including mmWave radar and the person entity's priority logic, see our complete presence detection guide; this article focuses specifically on getting device_tracker entities configured correctly.

How Device Tracker Entities Work

Every device_tracker entity reports one of a small set of states. Per the Home Assistant documentation, a device tracker reports home if it's inside the home zone, the name of a smaller zone if it's inside one of those instead, not_home if it's outside every zone, and unavailable or unknown if the platform has lost contact with the device.

Device trackers also fall into two categories. Home Assistant's docs describe position trackers — which use GPS or GNSS coordinates and set tracking_type: position — and connection trackers, which simply report whether a device is connected to something (a router, a network scan) and set tracking_type: connection. The Companion app is a position tracker; Nmap Tracker and Ping are connection trackers. This distinction matters because position trackers can tell you which zone you're in, while connection trackers can only tell you home or not.

One important note if you're following an older tutorial: Home Assistant's docs flag that some integrations still expose an older device tracker model that lacks the tracking_type and in_zones attributes, and these legacy trackers are scheduled for removal in the first half of 2027. If a platform you're using still relies on the old known_devices.yaml file, it's worth planning a migration to a config-flow-based platform before then.

Method 1: GPS Tracking with the Companion App

Best for: away/home detection and named zones (work, school, the gym) without any extra hardware.

The Home Assistant Companion app registers a device_tracker entity automatically once you log in and grant location permission — no YAML required. According to the Companion app documentation, location updates are triggered by zone entry/exit, app launches, background refreshes, significant location changes on iOS, and (optionally) iBeacon detection.

To set it up: install the app, sign in to your Home Assistant instance, and grant location access when prompted. On Android, also enable Zone Based Tracking in the app's companion settings — iOS sets this up automatically at launch. The docs note the app supports up to 100 geofenced zones; anything beyond that won't register. You can also choose how much location detail is shared per server — Exact (full GPS coordinates), Zone Name Only for privacy-conscious setups, or disabled entirely.

Battery impact is generally modest since the app relies on geofencing rather than continuous polling, though the docs note that Android's High Accuracy Mode — constant GPS — will drain the battery noticeably faster and is best restricted to specific zones or Bluetooth triggers rather than left on permanently.

Method 2: Network-Based Tracking with Nmap Tracker

Best for: households that don't want to install an app on every device, or as a secondary/fallback tracker.

Nmap Tracker scans your network directly for connected devices rather than relying on your router's own client list, which makes it useful when your router doesn't expose a compatible integration. It's set up entirely through the UI — no YAML needed.

Go to Settings → Devices & Services → Add Integration, and search for "tracker" to see the presence-detection integrations available, including Nmap Tracker, Ping, and any router-specific integrations like UniFi.

Home Assistant Add Integration search results showing Nmap Tracker, Ping (ICMP), and UniFi Network presence-detection integrations
Searching "tracker" under Settings → Devices & Services → Add Integration surfaces the main device_tracker platforms.

Select Nmap Tracker and fill in the configuration dialog. The key fields, per the Home Assistant docs, are the network addresses to scan (CIDR notation, e.g. 192.168.1.0/24), the minimum number of minutes between scans of already-known active devices, a comma-separated list of addresses to exclude, and optional Nmap command-line parameters for advanced scanning behaviour.

Home Assistant Nmap Tracker configuration dialog with network address, scan interval, exclusions, and command line option fields
Nmap Tracker's config flow asks for a CIDR range to scan, a scan interval, and any addresses or hosts to skip.

Home Assistant's docs describe Nmap Tracker's IoT class as "Local Polling" — it's an active scan initiated from your Home Assistant instance, not a passive listen. Shorter scan intervals detect arrivals and departures faster but increase network chatter and, for battery-powered devices, drain them slightly faster from having to respond to more probes.

Method 3: Ping (ICMP) Tracking

Best for: a lightweight, single-device fallback tracker that doesn't need a full network scan.

The Ping integration sends ICMP echo requests to a specific host and reports whether it responds. It's also set up via Settings → Devices & Services → Add Integration → Ping (ICMP), and it can expose three entity types: a binary sensor (enabled by default, simple online/offline), sensors for round-trip time, jitter, and packet loss (disabled by default), and — for presence use — a device_tracker entity (also disabled by default, so you'll need to enable it manually after adding the integration).

Two settings worth tuning: ping count — how many echo requests are sent per check, default five — and consider home, the delay in seconds before a device is marked not_home after it stops responding, which defaults to 180 seconds (three minutes). The default polling interval is 30 seconds.

Both Nmap Tracker and Ping share the same real-world caveat: modern phones frequently switch off Wi-Fi to save battery when idle, which can cause spurious not_home readings even while the phone is sitting on a table at home. A longer consider_home window reduces false departures at the cost of slightly slower detection of a genuine departure.

Legacy YAML Trackers: Bluetooth LE Tracker

Before the modern Bluetooth integration existed, Home Assistant offered Bluetooth LE Tracker as a YAML-configured platform under the device_tracker: key:

device_tracker:
  - platform: bluetooth_le_tracker

Discovered BLE devices were stored in known_devices.yaml with a BLE_ prefix. Key options included interval_seconds (default 12), track_new_devices, and battery-tracking toggles. Home Assistant's docs now list it as a legacy integration that depends on the newer Bluetooth integration being enabled, and while it still functions, new setups are steered toward configuring Bluetooth-based presence through the main Bluetooth integration rather than this older platform — particularly given the 2027 removal timeline for trackers using the old attribute model.

Checking Entity State in Developer Tools

Once any platform is configured, you can inspect the resulting entity directly. Go to Developer tools → States and search for your device_tracker entity. This is the fastest way to confirm a platform is actually working before wiring it into an automation — check that state updates correctly when you leave and return, and review the attributes for context.

Home Assistant Developer Tools States page showing a device_tracker entity with state home and attributes including source_type gps, tracking_type position, and gps_accuracy
A GPS-based device_tracker entity in Developer Tools → States, showing its state and position attributes.

For a GPS-based tracker like the Companion app, you'll see attributes such as source_type: gps, latitude, longitude, gps_accuracy, and battery_level. A connection tracker like Nmap or Ping shows a simpler attribute set, since it has no coordinates to report — just the connection state itself.

Automating on Device Tracker State

Once an entity reports reliably, you can trigger automations directly off its state changes, or — better, once you have more than one tracker — off the combined person entity that Home Assistant builds from multiple device trackers. A basic example:

trigger:
  - trigger: state
    entity_id: device_tracker.johns_phone
    from: "not_home"
    to: "home"
action:
  - action: light.turn_on
    target:
      entity_id: light.hallway

For automations built around more than one tracked person, see the Home Assistant automations guide for trigger and condition syntax.

Choosing a Platform

For most households, the Companion app is the best starting point — it needs no extra hardware, supports multiple named zones, and updates via efficient geofencing rather than constant polling. Add Nmap Tracker or Ping as a secondary, app-free tracker for devices that can't or shouldn't run the Companion app — a guest's phone, a laptop, or anyone unwilling to share GPS location. Link both to the same person entity so Home Assistant can reconcile them automatically, favouring the stationary network tracker while you're home and GPS while you're away.

Frequently asked questions

What's the difference between a position tracker and a connection tracker in Home Assistant?
A position tracker (like the Companion app) reports GPS coordinates and sets tracking_type to position, so it knows which named zone you're in. A connection tracker (like Nmap Tracker or Ping) only knows whether a device is connected or reachable, setting tracking_type to connection — it can report home or not_home but has no concept of which zone.
Why does my device_tracker entity keep showing not_home when I'm actually home?
This is usually caused by a phone disconnecting from Wi-Fi to save battery while idle, which trips network-based trackers like Nmap Tracker or Ping. Increasing the consider_home delay (Ping's default is 180 seconds) gives the device longer to reconnect before being marked away, and pairing a network tracker with GPS-based Companion app tracking through a person entity reduces false departures further.
Do I need to write YAML to set up device_tracker in Home Assistant?
No, not for the current platforms. The Companion app, Nmap Tracker, Ping, and router integrations such as UniFi are all configured through Settings → Devices & Services → Add Integration. Only legacy platforms like Bluetooth LE Tracker still use the older device_tracker: YAML key.
Is Bluetooth LE Tracker being removed from Home Assistant?
Home Assistant's documentation notes that device trackers using the old attribute model — which lack the tracking_type and in_zones attributes, including some legacy YAML platforms — are scheduled for removal in the first half of 2027. Bluetooth LE Tracker is currently listed as a legacy integration; new setups should generally use the main Bluetooth integration for BLE-based presence instead.

Sources

Sources verified 2026-08-07

  1. Home Assistant — Device Tracker Integration
  2. Home Assistant — Mobile App Integration
  3. Home Assistant Companion — Location — Companion App Docs
  4. Home Assistant — Nmap Tracker Integration
  5. Home Assistant — Ping (ICMP) Integration
  6. Home Assistant — Bluetooth LE Tracker Integration
  7. Unsplash — White and black modem router with four lights — photo by Misha Feshchak
How we researched this

Claims in this article are checked against primary sources — manufacturer specifications, official documentation, Which? research, Ofgem guidance, or gov.uk — rather than forum threads or video reviews. Where the author has direct hands-on experience with a product (most Home Assistant, Zigbee, and home-networking gear is running in his own homelab), that is stated explicitly in the text.

For categories outside that personal setup — such as boilers, heat pumps, and other areas that are traditionally a heating engineer's domain — verdicts are built from cross-referenced manufacturer data, published lab results, and vetted expert and owner reviews rather than a claim of personal hands-on testing. See the editorial policy for the full methodology.

Sepehr

Written by

Sepehr

10+ years hands-on with Home Assistant & networking · Research-backed elsewhere · No brand deals

Smart home specialist with 10+ years running a self-hosted Home Assistant setup — Zigbee2MQTT, Frigate NVR, and local-first automations. Independent coverage for UK homes, no brand deals.

LinkedIn →

Related reading