Hi, I’m looking to see if it’s possible to set up multiple device tracker instances of the same platform with different intervals. Currently, I have a configuration for my family that works well, but we have some extended family that I’d (or maybe they’d ) rather not install the home assistant app on their phones.
For my immediate family, I have pretty tight timings and use automations to lock up shortly after departure. However, for the extended family, I primarily just want to make sure that if me or my wife leave and one (or more) of them are home, it won’t turn off the lights and lock up. They all know to manually lock up if they leave while we are still out, so I’m not worried about looser timings to prevent false departures on their iphones (which constantly switch between home and away).
I tried adding two separate ping entries with different configurations, but it doesn’t see to respect the longer interval, i.e. nicoles_phone_ping was still swapping back and forth every 5 minutes, despite consider_home being set to 15 minutes.
Is that not possible? I did restart home assistant after adding the second ping instance, and the logs didn’t seem to complain at all, so I’m not sure if it’s just not supported and silently discards the extra config or not.
I thought about adding the other configuration via nmap, but currently nmap tracker is broken.
Oh wow, haha! I had been running nmap tracker for a long time and recently had to switch away once namp broke as of 2023.2 (nmap fails to obtain mac address in 2023.2.x · Issue #87623 · home-assistant/core · GitHub). I had basically ported over the configuration, just changing the platform and I guess never realized the setting didn’t exist. Thanks for the info!
I didn’t think template binary sensors could be connected to person entities though (even with a presence device class). I thought it needed to basically be a template device tracker, which doesn’t exist, right?
Yeah you’re right. I don’t use the person integration so I missed that. You can do it with an automation though. Using the ping binary sensor (not ping tracker) and this automation:
alias: Presence Chris Phone Ping
trigger:
- platform: state
entity_id: binary_sensor.chris_phone_ping
to: 'on'
- platform: state
entity_id: binary_sensor.chris_phone_ping
to: 'off'
for: 120
action:
- service: device_tracker.see
data:
dev_id: chris_phone_ping
location_name: "{{ 'home' if trigger.to_state.state == 'on' else 'not_home' }}"
mode: queued
max: 10
The device_tracker.see service will create the tracker based on the dev_id, so device_tracker.chris_phone_ping