Device tracker Android

Hi, I have Iphone working fine when I leave and enter other zones.
For android I have device tracker enabled but the yaml file it make by default is missing GPS, lat and longitude etc. And not close to what was done for Apple by default

at this point is the best was to wipe the android config in HA and start over?!!!

where I am at:

  1. this is returning the exact correct address into HA for the android device
    sensor.<>_geocoded_location

the device trackers I enabled and then the yaml only has source gps and friendly name fields nothing else
device_tracker.<>

I tried to manually copy what in iphone yaml but not sure that correct approach as I did no yaml config for apple device and worked fine

any suggestions?

thanks

On the android, in the companion app settings, did you enable location and give it the necessary permissions?

https://companion.home-assistant.io/docs/core/location#manage-location-tracking-level

yes this is why sensor has correct address In HA as advised
the issue I am having is tracker
thanks

That is one of several location sensors on android, the others are enabled as well? background location and location zone. There should also be an option for high accuracy.

it’s enable in my android and i’m positive i did not modify any yaml config for it. but i might have enabled long ago. i don’t recall… but one of my androids does have it disabled… so up front i don’t know the answer off the bat, but here’s something to take a look at…

if you go to the mobile app integration (settings->integration->mobile app)

you should see your devices listed. pick that device. you should see something like this:

see the center (‘entities not shown’)… hit that and see if there’s a “geocoded location” listed.

if there is, then open that, then hit the gear icon in the upper right…

then enabled. hopefully that works for you…

What yaml are you refering to? The Android companion generates a device tracker, but ther’s no yaml involved. Can you post what yaml you are talking about?

follow these steps for the android device tracker

Thanks I review

In mean time I removed the device tracker from my person and when I try to re add it
I get

invalid entity ID for dictionary value @ data['device_trackers

From the error, I see a s behind device tracker that does not belong.

thanks but I don’t see the extra s anywhere in the device tracker itself under the dev tools etc

as for the yaml file it is shown in dev tools when you pull up person or device tracker
for my apple I have lat,log etc for the android it not there, address is fully in HA it just wont track zones for some reason on android (apple works 100%)

This is not yaml, so referring to it as yaml adds to a lot of confusion. You can specify persons in yaml, you can also do it in the GUI. They will show the same in dev tools.

The error you show, where does it come from? What are you doing at that time, is there actual yaml involved, is it in the GUI, if so where?

If Android does not track zones, as stated above, you should check the settings for the companion app on the phone, for the sensors, this part:

it is a yaml
it the state attributes for the device tracker

HA. clearly provides:

State attributes (YAML, optional)
android only has this for device tracker

source_type: gps
friendly_name: test android phone

the app is fine as device tracker loaded to HA means I provided proper permissions per the guide
only thing not working is device tracker

geo sensor has full address in HA as advised prior

@dshokouhi thanks for the guide very helpful but I think something got messed up so might be easier I just delete all from HA and re add it and see what I get

In that case follow the steps directly above the one I linked. Then enable location tracking when giving the device name.

everyone thanks for all your help
I ended up deleting the device from HA and re adding it now it working fine for zones etc