Location sensors - Making use of "High accuracy mode when entering zone"

I thank you for all the advice you gave me, the links, and the information. I have read and reread them several times. But I can’t understand them, only few things. I don’t know if it’s the fault of the translator, who translates badly, or simply my stupidity (the most obvious thing according to Occam’s razor). But I would like understand…I think to have a lot of troubles

so here are the steps I took and the configurations I made:
upon first installation I activated the tracker sensor and it asked me for high precision and only when using the app. then it asked me to disable battery optimization

then in the settings I have:
sensor update rate: always fast. every minute always
sensor management:
proximity sensor: disabled
geolocation sensors
geographic location
enable sensor: enabled.
sensor setup - update sensor with position sensors: enabled
minimum precision 200

position sensors:
High precision position range: 5 seconds
high precision mode: (false) but if I go inside the enable sensor button is on

position in backgroud: enabled
if I enter the menu
high precision mode activated
only when entering the area
“zone.home”
High precision mode activation range 800 meters
minimum precision 200 exact position

single accurate position: enabled
location zone enabled

these are the settings I have. is it okay how I put them? should it work like this? I forgot something?

I don’t know where else to go. maybe inside my Samsung somewhere in the battery settings should I add the home assistant application among those that should not be put on standby? but I don’t know where to find this setting…because I searched but didn’t find it.

So you decide to only let the app get location data when the app is open? Why did you think allow all the time was not a good option? Especially when it was called out as a troubleshooting step (2).

How do you expect the app to get location updates without having location data all the time?

As you have a Samsung device you have more things to disable like power saving, data saving etc… this was mentioned in step 4 in troubleshooting.

As mentioned in the docs this setting only impacts sensors and not location reporting.

This will lead to extra battery drain. I think we also mention this in our troubleshooting section.

I have another question to ask: I saw that you can make the high precision sensor switch off when you connect to a wifi, with a trigger (there is also an example of the code)… the question is: would it be possible instead of using a trigger to create a switch, in order to manually turn the high precision sensor on and off?
thanks

Sure…
Just create an automation that triggers on the switch (input boolean) and send the command to the phone.

Okay…thanks!!!. did you create this switch too? I am having difficulty turning high precision on and off when I need it. I was thinking that by creating this switch, I could then, with some specific conditions (e.g., when you are 3000 meters from home and your tracker’s speed is over 15 m/s), activate the high precision sensor, and when you are connected to the Wi-Fi network, it should remain off (I am doing this using Node-RED). In your opinion, could this work? Or, in this case, would the switch not work? only one questione, what’s input boolean? I insered this in configuration.yaml
I’ve not undestand the different between input bolean or not input bolean

switch

  • platform: template
    switches:
    gps_high_accuracy:
    friendly_name: “GPS Alta Precisione”
    value_template: “{{ is_state(‘sensor.gps_high_accuracy’, ‘on’) }}”
    turn_on:
    service: notify.mobile_ap
    data:
    message: “command_high_accuracy_mode”
    data:
    command: “turn_on”
    turn_off:
    service: notify.mobile_ap
    data:
    message: “command_high_accuracy_mode”
    data:
    command: “turn_off”

You need to format the code as preformatted text or its unreadable.

okey…

another queston… if I unistall and reinstall on android home app companion and configure it works well… overy one minutes update tracker distance… but if my android phone turn off at restart not works well

how is possible that?

I don’t know

the app uses workmanager, if the app was killed for whatever reason you just need to open it again once and it will reschedule it. your device may have lost the schedule during shutdown.

Yes, even though an older thread, I thought I’d add two cents. I have been setting up zones in HA and also mostly due to my own ignorance found them inaccurate due to my companion app settings and failures to read thoroughly.

I should note here, I’m using a Samsung S24 Ultra. Everything battery and optimization turned off. I don’t rule out the Samsung unknown, I’m running one UI 7 beta, Android 15 on that.

So I moved from that and setup Owntracks, http mode, I used Tasker to send intents to change modes in Owntracks. Purpose arm and disarm, Alarmo & Simplisafe.

It sorta worked a couple times. After two Ai helping, long troubleshooting, it was still flaky. So, after long adjustments etc., I went back to the companion app location sensor settings and discovered a couple were off. May be related to constant HA beta updates and changed them, or I did and forgot. The latter more likely.

Today after turning all those back on including high accuracy, all of them. It worked again.

What I’ve discovered during this, and didn’t know, Tasker intents can also be sent to update HA sensors, the expanded zone I haven’t added yet but will, also probably expanding zone sizes, worked well leaving, but only disarmed both at about the garage door.

This is just a brief, any questions ask now and I’ll try to answer while I still remember. Old and forgetful. Lol

So some more tweaking to do, observe location sensor status after updates, just because I need to know.

I also went as far as setting additional intents with parallel profiles and tasks in Tasker using Autolocation plugin for Owntracks modes.

It’s been a trip, mostly due to my own ignorance and failure to read “all” related documentation. I’m sure I’ve missed something as I write this.

This issue has bugged me for quite some time now. For the record, I use iOS for my companion app.

One of the “luxury” automations I want to work consistently is when I approach my home in my car the garage door opens. Sometimes it works, sometimes it doesn’t, all based on how frequently HA polls my location.

I think I may have figured out a reasonable workaround today!

I made an automation action that calls the “update entity” service.

First, I created a sequence in a script which will be called by the automation. This sequence runs the “update entity” service in HA with my location every 5 seconds, and repeats 60 times (5 minutes max).

I then setup an automation to run the script based on some triggers.

My automation triggers are 1) when I enter a “buffer” zone. For this buffer zone I made a large zone about 3/4 of a mile away from my residence) with a decently large radius. The only time I would pass through this zone is when I enter or exit my neighborhood. So this solution still only works until I enter this much larger zone. I set an ID for this trigger.

For actions I did ‘choose’ and then ‘triggered by’ to call the ID above, and then set a few conditions to make sure the automation only fired based on a few specific safety parameters: a) I am travelling in the direction of my home (I use the Proximity integration to set this up), b) I am not home, c) my phone’s GPS accuracy is below a certain level (to eliminate false triggers), and one more to weed out false triggering.

If it passes all of the conditions, I tell it to start the script I made which will start pinging my phone’s location every 5 seconds (up to 5 mins max)

Then in the same automation I setup 3 more triggers and gave them appropriate IDs: 2) when I enter my home zone, 3) when my garage door starts opening, and 4) when my phone connects to the home network. All of these additional 3 triggers are then set to stop the script so that it doesn’t stay running for 5 minutes.

Anytime my garage opens via my “Open Garage Door” automation as a safety precaution so I know when it was opened or not.

Now that I think of it, I can use the Proximity integration to also trigger the script once my location reaches a specific distance away from home as an additional trigger to stat the polling script.

Hope this helps! Here is my script below:

sequence:
  - repeat:
      sequence:
        - action: homeassistant.update_entity
          target:
            entity_id:
              - entity.home_person_distance
          data:
            entity_id:
              - person.owner1
        - delay:
            hours: 0
            minutes: 0
            seconds: 5
            milliseconds: 0
      count: 60

That will only update the distance which won’t do anything.
You need to update the device tracker.