Duplicated device_trackers for my phone

Hi,

I have an Android phone and installed the Home Assistant app.

I see that I have three device_tracker entities for the phone:

They all say there that they come from the Mobile App

device_tracker.sm_n975f has state like so:

source_type: gps
battery_level: 100
latitude: -34.xxxxx
longitude: 18.xxxxx
gps_accuracy: 6
altitude: 51
course: 90
speed: 0
vertical_accuracy: 2
friendly_name: SM-N975F

That battery figure is wrong.

Another is device_tracker.cm_n975_2:

source_type: gps
battery_level: 69
latitude: -34.xxxx
longitude: 18.xxxx
gps_accuracy: 17
altitude: 51
course: 0
speed: 0
vertical_accuracy: 2
friendly_name: SM-N975F

That battery figure seems more correct. Suprising since I uninstalled the Home Assistant app to try to clean this up.

The third entry is some sort of zombie. It doesn’t show in the Developer Tools “states”.

Looking at in on Configruation>Devices I just see:

How do I clean this up? I can’t delete the devices, and they aren’t in known_devices.yaml or anywhere else I can find in the config.

What went wrong to get this like this?

Thanks,
Steve

uninstall the app. delete the integration from your HA integrations page. Verify that the mobile device trackers no longer exist in your entities page (if they are still there delete them).

reinstall the app and log back in and see where it gets you.

I believe I also have two devices under the integration but i only have one device tracker for my phone.

Hi @finity,

Thanks for the advice which I’m trying now.

Can I add a related question? My homeassistant “sees” my phone two ways - one is via the reporting from the app, the second is with device_tracking via my Unifi controller. Is there a way to merge this info into a single view of the device?

Thanks

Hi,

I did as suggested.

Having reinstalled Home Assistant on my ipad I had to re-set it up and it shows in HomeAssistant now (still called ipad_2 for some reason?)

I reinstalled on my Android phone and its working on the phone (it came back working without re-setting it up) but the device doesn’t show up on Home Assistant… ???

Oh foeee now what.

To try to get my Home Assistant Android to rerun its setup I deleted the refresh tokens associated with the phones IP address.

I then reinstalled Home Assistant on my phone and now it just shows “Unable to connect to Home Assistant” with a RETRY button and no other options.

How do I get it to reconnect?

yes, look into the “person” integration. It uses multiple device trackers and combines them into one entity.

there is no “enter address manually” button?

as far as the refresh tokens I’m not sure what is needed for that. I’ve never needed to mess with any of those.

try going into the android app on the phone and clearing the data & cache and try to reconnect after that.

Error and nothing else.

I deleted the data/cache for the app and that got it back sane again. I had to enter the address manually (iPad found my server automatically) - but once I did that it worked.

Thanks