New Unifi Tracking

I’ve been tracking devices through my unifi controller for a long time with no issues. I recently upgraded to 0.99.3. and everything appears to be working fine… but. One of the kids got a new phone so I need to remove the old one from HA and add the new one.

If I understand correctly it looks like HA no longer uses the known_devices file. I have nothing in my known_devices file. And I don’t have a device tracker line in my config. All I have for unifi is:

unifi:
  controllers:
    - host: 192.168.1.xxx
      site: SiteName
      dont_track_wired_clients: enable

I have lots of entities that show up like this:
[device_tracker.unifi_00_00_3b_06_1b_85_sm0mktix]

So it looks like they’re being pulled from the unifi controller. No problem there. Even the new phone shows up like this.

The problem is the old phone is still listed and HA is still expecting to see it. Is there any way for me to delete the old phone? Or maybe change the IP and mac address of the device_tracker entity?

You can disable the device in the device registry or wait a few days and then delete it once unifi has stopped keeping it inte active devices list

1 Like

Use the GUI.

Configuration > Entity Registry

I tried the gui. When I try to delete it says:

Are you sure you want to delete this entry?

Deleting an entry will not remove the entity from Home Assistant. To do this, you will need to remove the integration “unifi” from Home Assistant.

Looks like if I disable it, update, then delete it, then it removes it from home assistant. Even though it says it won’t. I deleted several entities this way and they no longer show up in the states page. Now I hope it will get re-discovered.

On this topic and now that known_devices.yaml is depreciated, can anyone advise if it’s possible to add a custom icon to the UniFi device trackers as I’m missing those now?

It’s all on the customization section in configuration page.

Thanks. I can see where to add a mdi: but not a custom image like I had before. Is that still supported?

Yes, that’s still supported. The field is named “entity_picture (JSON formatted)” and you can set any locally available images , like “/local/mypicture.png”

Thanks. But when I try that, I get this after hitting save:
image

Seems there is a bug in 0.100.2? When you add the code as this:
"entity_picture" "/local/David.jpg", it appears in customize.yaml as this and of course does not work.

device_tracker.david_s_phone:
  '"entity_picture"': '"/local/David.jpg"'

A manual edit fixes things.

And did it show up again? I also have a few phantom devices I need to delete and wondering what the best way would be…