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.
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.
The state of a tracked device
The type of state a device tracker can have depends on whether it uses GPS or a router as the data source.
A device tracker with GPS as a source can have any number of string states. The integration can return one of the following options:
- Report GPS coordinates. The coordinates are then matched to a zone (which is set as state). If the home zone is matched, the state will be Home. If no zone was matched the state will be Not home.
- Report a location. This could be any string which is set as state.
A device tracker with router as a source can have one of two states: Home, or Not home.
- Home: Your tracked device is in the home zone, detected by your network or Bluetooth-based presence detection. If you’re using a presence detection method that includes coordinates: when it’s in a zone, the state equals the name of the zone (case sensitive).
- Not home: When a device isn’t at home and isn’t in any zone.
Screenshot showing the state of a device tracker entity in the developer tools.
In addition, the entity can have the following states:
- Unavailable: The entity is currently unavailable.
- Unknown: The state is not yet known.