The person component allows connecting device tracker entities to one or more person entities. The state updates of a connected device tracker will set the state of the person. When multiple device trackers used, the state of person will be determined next way:
- If there are stationary sources (which type is not ‘gps’) presenting status ‘home’, the latest of these sources will be taken.
- If there are sources of type ‘gps’, then the latest of these sources will be taken.
- Otherwise will be taken the latest source with status ‘not_home’.
Let’s say, for example, that you have 3 trackers: ‘tracker_gps’, ‘tracker_router’ and ‘tracker_ble’.
- You’re at home, all 3 devices show status ‘home’ - status of your Person entity will be ‘home’ with source ‘tracker_router’ or ‘tracker_ble’, whatever was latest.
- You’re going out. ‘tracker_gps’ shows status ‘not_home’, but the other two trackers show status ‘home’ according to their setting ‘consider_home’. You are still considered to be at home.
- After some time both stationary trackers show status ‘not_home’. Now your Person entity has status ‘not_home’ with source ‘tracker_gps’.
- While you are outside your home, your Home Assistant was suddenly restarted. Until ‘tracker_gps’ receives an update, your status will be determined by stationary tracker, which gets the latest update after a restart. Obviously, the status will be ‘not_home’.
- Then you’re going into the area marked as ‘zone1’, ‘tracker_gps’ is getting an update, and now your status is ‘zone1’ with source ‘tracker_gps’.
- You’ve returned home and your mobile device has connected to the router, but GPS update yet didn’t occur. Your status will be ‘home’ with source ‘tracker_router’.
- After the GPS update occurs, your status will still be ‘home’ with source ‘tracker_router’ or ‘tracker_ble’, whatever updates latest.
TL;DR: When you’re at home, your position is determined firstly by stationary trackers (if any) and then by GPS. When you’re outside your home, your position is determined firstly by GPS and then by stationary trackers.
Hint: When you use multiple device trackers together, especially stationary and GPS trackers, it’s advisable to set
consider_home for stationary trackers as low as possible.
You can manage persons via the UI from the person page inside the configuration panel or via
If you prefer to use the configuration panel to configure the
person component simply add one line to your
configuration.yaml file and restart Home Assistant.
If you prefer YAML, you can also configure your persons via
# Example configuration.yaml entry person: - name: Ada id: ada6789 device_trackers: - device_tracker.ada
(string)(Required)A unique id of the person.
(string)(Required)The name of the person.
(string)(Optional)The user id of the Home Assistant user account for the person.
ID) of users can be inspected in the “Users”/”Manage users” screen in the configuration panel.
(list | string)(Optional)A list of device tracker entity ids to track. These will represent the state of the person.
An extended example would look like the following sample:
# Example configuration.yaml entry person: - name: Ada id: ada6789 device_trackers: - device_tracker.ada - name: Stacey id: stacey12345 user_id: 12345678912345678912345678912345 device_trackers: - device_tracker.stacey - device_tracker.beacon