Device_tracker setting up multiple hosts. HELP!

Hello everyone,

Trying to set up a simple person tracker using device_tracker ping.

This is my current configuration in yaml

device_tracker:
  - platform: ping
    hosts:
      miriam: 10.0.0.206

  - platform: ping
    hosts:
      vale: 10.0.0.207

before that set up, I did it this way.

device_tracker:
  - platform: ping
    hosts:
      miriam: 10.0.0.206
      vale: 10.0.0.207
      cancunmanny: 10.0.0.211

So this is where I am confused. After I listed all 3 different IPs I want to track I restarted HA. I then went to Configuration/Persons . When I select any person it now gives the option to select “device to track”. However when I hit the drop down menu to select a device the ONLY option is cancunmanny.

if I take out the device_tracker from my Yaml file and reboot, when I go to persons I don’t get the option to select a device to track. If I put device_tracker configuration back into my yaml file, without including cancunmanny at all, when I go to persons again the only option to select is the cancunmanny one, even though it is not even on the yaml file.

What am I missing?

Hosts should be host. Look at: https://www.home-assistant.io/integrations/ping/

I have read that link a few times. That is how I got started to begin with.

However the link only lists one “host”, I am trying to add multiple hosts.

Also the link doesn’t explain why “cancunmanny” continues to show as the only option to assign to a person, even though the device_tracker.cancunmanny is not even defiened in the yaml file.

Ok. Please try this

binary_sensor:
  - platform: ping
    host: 10.0.0.206
    name: miriam

  - platform: ping
    host: 10.0.0.207
    name: vale

That would create binary sensors, which I guess I could then play with. But device_tracker already has properties I wouldn’t have to manually set up.

Seems first I need to figure out why device_tracker.cancunmanny keeps showing up even if no such host is configured in yaml file. And then I would like to figure out how I can track different phones for different people

Device_tracker searches for known devices. It probably found it the first time you configured it without having an error in your config.

Or do you use the HA app on that phone?

I don’t think i use an app on the phone. I just have a bookmark on my desktop that takes me to my HA instance.

Ok, seems I figured it out. While I was trying to set the two new ones, they were not on the actual network, so that is why it wasn’t working. Like you mentioned it goes after known devices, and before it wasn’t known.

I took a look again after my gf and her daughter came back with their cell phones, and they had a chance to connect to wifi. Sure enough, it worked as expected then.

2 Likes