Integrations

Person

Spook adds actions to create, change and delete persons, and to add and remove their device trackers on the fly, and tells you when a person tracks device trackers that no longer exist.

The person integration in Home Assistant tracks where the people in your household are. A person is a collection of device trackers that together say where that person is. A person can also have a user account attached, to log in to Home Assistant.

Home Assistant lets you add, change and delete persons on the People page, by hand. Spook adds actions for it, so an automation or a script can do the same: make a person for a new housemate, link it to their user and phone, and delete it again when they move out. And to change the device trackers of a person on the fly. Spook also tells you when a person tracks something that is gone.

The Add action dialog, searched for device tracker, with the actions Spook adds marked with a ghost.
Spook adds some new actions to the person integration.

Actions

Spook adds five actions for persons. You find them wherever you add an action, marked with a 👻.

Add a device tracker

Adds one or more device trackers to a person.

The trackers of a person are set by hand on the People page, and stay that way. Real life does not. Somebody borrows the car with the GPS tracker for the weekend, or a kid takes the family tablet to school. With this action, an automation attaches the tracker to whoever has it right now, and removes it again later.

How to use it

  1. Open the automation or script that should do this, and select Add action.
  2. Search for add a device tracker, and select Person: Add a device tracker 👻.
  3. Under Person, choose the person.
  4. Under Device tracker, choose one or more device trackers.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Add a device tracker 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

Remove a device tracker

Removes one or more device trackers from a person.

The other half of Add a device tracker: the car is back, so its tracker no longer says where that person is.

How to use it

  1. Open the automation or script that should do this, and select Add action.
  2. Search for remove a device tracker, and select Person: Remove a device tracker 👻.
  3. Under Person, choose the person.
  4. Under Device tracker, choose the device trackers to remove.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once.

The Actions tool with Remove a device tracker 👻 picked and filled in with an example.
What Try this action opens, filled in with an example.

Create a person

Creates a new person, the same as adding one on the People page.

A new housemate moves in. Setting up their phone app, their user and their person is a trip through three settings pages. With this action, the script that sets up a new housemate makes the person too: linked to their user, so they log in as that person, and to their phone, so Home Assistant knows when they are home.

How to use it

  1. Open the automation or script that should create the person, and select Add action.
  2. Search for create a person, and select Person: Create a person 👻.
  3. Fill in Name, like Sam.
  4. Fill in whatever else you want to set: User ID, Device trackers or Picture. To pick the entity ID yourself, fill in Person entity ID.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once. Mind you: running it creates the person for real.

Delete a person

Deletes one or more persons, disabled ones included.

The other half of Create a person: a guest who stayed for a few months moves out, and their person can go. Everything in the list is checked first: if one of them cannot be deleted, none of them are.

The user a person is linked to stays. Deleting a person on the People page deletes that user as well, this action leaves it be. Once the person is gone, that user only shows on the Users tab of the People page, which you see with advanced mode on in your user profile. A user that should go, you delete there, or disable from an automation with Disable a user.

How to use it

  1. Open the automation or script that should delete the person, and select Add action.
  2. Search for delete a person, and select Person: Delete a person 👻.
  3. Under Entity ID, choose the persons to delete.
  4. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once. Mind you: running it deletes the person for real.

Update a person

Changes persons made in the UI, the same as editing them on the People page. The change stays, through a reload and a restart.

Somebody gets married and takes a new name, or a kid gets their first user account. Without this action, that is a trip to the People page. With it, the script that sets up the new account links it to the person too.

How to use it

  1. Open the automation or script that should change the person, and select Add action.
  2. Search for update a person, and select Person: Update a person 👻.
  3. Under Targets, choose the person.
  4. Fill in what should change: Name, User ID, Device trackers or Picture. What you leave out stays as it is.
  5. Select Save.

Just want to see it work? Try this action opens it in your Home Assistant, ready to run once. Mind you: running it changes the person for real.

Repairs

Spook looks through your persons for device trackers that no longer exist, and tells you in the repairs dashboard. The repair names the person and the trackers that are missing.

This one Spook can fix for you, straight from the repair. New to repairs? Follow Fix your first repair.

Want Spook to leave one person alone? Keep it out on the Exclusions page of Spook's panel, or put the Excluded from Spook label on it. How that works.

Unknown device trackers

A person tracks a device tracker that no longer exists, usually because it was renamed, or the integration providing it was removed. The person keeps working on the trackers that remain. So somebody whose phone tracker disappeared is just located a little less accurately.

The Unknown device trackers repair for a person still tracking an old phone, with the choice to remove it.
An old phone that is gone, still on the person, and the offer to take it off.

How to fix it: Open the repair, and choose Remove the deleted device trackers to have Spook take the ones it marks as deleted, which Home Assistant removed, off the person. Or choose Let me fix it myself, and change the person on the People page. If you want to keep them, Keep them, stop telling me does that. The repair disappears by itself once it is fixed.

Use cases

What people use this for:

  • Add or remove a temporary device tracker for a person. For example, attach the tracker in the car to whoever took the car.
  • Set up a new housemate in one script: their person, linked to their user and their phone.
  • Remove the person of a guest when they move out.

Missing something here?

An action, an entity or a repair this integration should have? Say so. Stuck, or found a bug? There is help.