Iphone no longer exists but still shows up in UI of home assistant?

Having an odd issue with my install of Home Assistant on Hassbian, (I mention Hassbian just to verify that this isn’t related to the home assistant version, I also had the same problem with a previous install of hassio.) An old iphone I have sold months ago (completely wiped) is still showing up as being “home” in my web interface of Home Assistant. Everything is a fresh install of Hassbian and the only thing that has been ported over from hassio to the new install is the contents of my .homeassistant folder.

I have looked through the yaml files and the only time I see the old phone is in the known_devices.yaml file. When I delete it, it just shows up again. Strangest thing. Unless the person I sold the phone to has, unbeknownst to me, followed me home and is living in my attic, I think I have a setting that is really messed up. :laughing:

Any ideas? I had Homebridge setup early on, but no longer, and have ios notify engaged for a tablet, but that being the case, the bluetooth shouldn’t pick up an iphone that isn’t there. I had MQTT setup on the old phone as well. Just throwing things out there where perhaps may be settings that I am not seeing in the main home assistant folder.

What component are you using for device tracking?

If its iCloud I would check if that phone is still somehow linked to your account. It could be that that phone is still associated with your iCloud account and since you iCloud is home via your new phone the old one shows as home too.

I used the bluetooth component as a backup to know when the phone was home or not home, as well I had installed Owntracks with Cloudmqtt on the old phone to accomplish the same thing. As well I had the ios component installed for the HA ios app when i owned it. I cant really do anything with the old phone in my install now, it just is there lingering in the UI.

I’ll check on the iCloud aspect, although I am unsure how to set that tracking option up in HA, so i suspect I did not.

I would look at your bluetooth and owntracks setups then, see if there is any lingering setup related to the old phone.

What is the known devices entry for the old iphone? It should have an attribute that is telling you the source in the states tab too that would be good info.

I do notice in the known_devices the track is set to true for the old phone. I have it set to hide if not connected though, as it kept reappearing. I found another thread where a similar issue came up, but I am unsure how to apply that solution for myself, as I am pretty new at this. Anyway to reset mqtt database?

In my Cloudmqtt account online the only reference I see to the old phone is under the web socket/received messages. I can’t click on it to delete it though. That old message may be what is causing the persistence.

I think I fixed it now. I reset the messages and clients DB in cloudmqtt in the Details tab. All messages were cleared, phone is no longer appearing. I’ll see if this sticks. Thanks for the help!