I was trying to get my parents and brother’s GPS data from their Home Assistant into mine. It took me a while until I figured it out.
First, you’ll need a long-lived access token from the other Home Assistant instance.
Go over to your configuration.yaml and use the snippet below.
sensor:
- platform: rest
resource: https://[anotherHomeAssistantIp]/api/states/person.[entityToBeTracked]
name: John Doe
json_attributes_path: "$.attributes"
scan_interval: 600
value_template: "{{ value_json.state }}"
json_attributes:
- "latitude"
- "longitude"
- "gps_accuracy"
- "friendly_name"
headers:
Authorization: Bearer [long-lived access token goes here]
After a restart, you can use the sensor in your map cards. A small step for the community, but a big step for me. Hope you find it useful.