Hey there, I have 2 HA locations and am trying to figure out how to best tell when someone is at the other one.
Current Setup:
- There are multiple users, some have better tracking than others (i.e. HA companion app)
- Each location has a input_boolean per user toggled by HomeKit presence automations
- Automation watches input_boolean and uses device_tracker.see to create device tracker
- Device tracker attached to person using type: router with home/not_home states
- Startup automation calls device_tracker.see again (due to lack of persistence)
- Each user has minimally this device_tracker attached to them.
- Works well for single-location presence
Challenge:
- Each instance has a zone representing the other location and I would like to be able to share between them if someone is at the other location.
- They are both on the same tailscale network and can talk to each other.
What I've tried so far:
- Changed the automation for input_boolean -> device_tracker to type: gps with zone.home coordinates and then added a rest_command to update remote device_tracker.
- Works, but restart could incorrectly set person to not_home when they're actually at the other location more recently than the local tracker and could then mark them as away.
Question:
Is there a better/easier approach?
Potential alternatives:
- (probably best?) Instead of a rest_command to the device_tracker api, send updates to a new input_boolean when it changes and use it to create a 2nd device_tracker (basically just persist the other input_boolean). Would need to just hard code the input_boolean to a particular zone to set gps coordinates as part of the automation but probably easy enough. No need to send these updates on HA boot.
- Use remote_homeassistant integration?
It also seems like I've seen some people using the bayesian sensor with multiple presence inputs? This seems like it could be additionally useful with multiple trackers?