202670

Device tracker

The device tracker allows you to track devices in Home Assistant. This can happen by querying your wireless router or by having applications push location info.

Note

Building block integration

This device tracker is a building block integration that cannot be added to your Home Assistant directly but is used and provided by other integrations.

A building block integration differs from the typical integration that connects to a device or service. Instead, other integrations that do integrate a device or service into Home Assistant use this device tracker building block to provide entities, services, and other functionality that you can use in your automations or dashboards.

If one of your integrations features this building block, this page documents the functionality the device tracker building block offers.

To set up device tracking, add an integration that provides device_tracker entities, like the Home Assistant Companion app for phone-based location tracking or a router-based integration such as Ubiquiti UniFi. You can connect device trackers to person entities and use them with zones for automations that react when people or tracked devices enter or leave a place.

The state of a tracked device

  • The name of the smallest zone the device is currently in.
  • Home if the device is in the home zone.
  • Not home if the device is not in any zone.

In addition, the entity can have the following states:

  • Unavailable: The entity is currently unavailable.
  • Unknown: The state is not yet known.

Zones

The state attribute in_zones is a list of all zones a device is in, sorted by size with the smallest zone first.

Coordinates

If an exact location is known and shared, a device tracker will have the state attributes latitude, longitude, and optionally gps_accuracy in meters.

Type of device tracker

Device trackers can either track the exact position of a device, for example with GPS, or track whether the device is connected to a fixed device, such as a Wi-Fi router or Bluetooth beacon.

Position trackers

Device trackers that track the position of a device, for example with GPS or another GNSS, have the tracking_type state attribute set to position.

Connection trackers

Device trackers that track whether a device is connected to a fixed device have the tracking_type state attribute set to connection. Connection device trackers assume the device is in their associated zone when connected. The default associated zone is the home zone, but you can customize the device tracker to use a different zone.

Legacy device trackers

Some integrations provide an older device tracker model which do not have the tracking_type or in_zones state attributes. These device trackers are scheduled for removal in the first half of 2027.

Screenshot showing the state of a device tracker entity in the developer tools Screenshot showing the state of a device tracker entity in the developer tools.

Related topics

Help us improve our documentation

Suggest an edit to this page, or provide/view feedback for this page.

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /