Hello, I have an automation that turns my lights on when any family member arrives home, if it’s dark, and it works fine, most of the time, however, sometimes my location seems to jump to a place outside of my home area, and then right back to home again causing the lights to come on. Is there a way to make it conditional on being away for a certain period of time, and then back to the home zone? Thanks in advance.
Best is to fix the location jump rather than just one automation coz it going to mess with all other location base automation? What do you use for you location? Why dont you use “Person” to add multiple trackers that way you dont get that issue eg GPS plus router base tracker
I would love to fix the jump, but I don’t know how to, it happens with more than one entity too. I am using person, and have it set to my Home Assistant app on my phone, plus, I use Life360’s information. I have already made the zone larger, that makes it happen less often, and also helps when the update timing causes me to sit and wait for the garage door to open, or my arrival lights to come on. it would be great of we could make zones that are donut shaped, then I could have a kind of outside perimeter that’s larger and use from to zone movement.
Also, there is a simple way to do time away from a zone, and then back in Node-RED, but I no longer use it, since HA’s automations have gotten better and easier, it no longer made sense to have it still bogging down my old Pi. So I figured if Node-RED can do it, there should be a way to do it in yaml too.
For Life360 at least, have you limited the accepted GPS accuracy?
Basically, the location info from Life360 includes an accuracy value (in meters), the larger the value the less accurate the location reading is. (I.e., if the accuracy is zero, then it’s saying the device is exactly at the point specified by the latitude & longitude. For a non-zero accuracy value it’s saying the device is somewhere within a circle where the GPS coordinates are the center, and the accuracy value is the radius. The bigger the accuracy value the bigger the circle and, therefore, the less accurately the location is known.)
In my experience, the accuracy value is usually around 15 meters, but sometimes it can jump to a much larger value, even hundreds of meters. It’s possible sometimes these jumps you’re seeing could be due to a relatively inaccurate location reading. With the life360 integration you can tell it to ignore location readings/updates whose accuracy value exceeds a threshold you can set. If you go to the Integrations page and click on CONFIGURE for the Life360 integration, you can check the “Limit GPS accuracy” box and enter a number under “Max GPS accuracy (meters)”, e.g., a value of 100, 50, whatever you like. Remember, the smaller the number the more accurate the reading must be to be used.
Another possibility is that the person integration does not take into account how stale the location information is from an “input” entity’s state update. Note that device tracker entities can update for reasons other than strictly the location info. E.g., maybe a battery attribute is updated, but the GPS data isn’t. As far as the person integration is concerned, the update is an update, so it uses it. The result can be the person entity gets a new location from one input, then gets old location from another input, but treats it as new, causing the person entity to “jump” back to where the device was, not where the device is. This is one of the main reasons I don’t use the person integration for combining multiple device tracker entities.
FWIW, I created a custom integration for combining multiple device trackers (and optionally binary sensors) long before the person integration existed. It uses the last_seen
attribute of input entities that have it, such as Life360 & Google Maps, which avoids the problem of old location data replacing newer location data. Unfortunately, though, most integrations that create device tracker entities don’t provide a last_seen
attribute, so there’s no way to know when one of their entities update if it actually has newer location data or not.
BTW, it’s common for my Composite Tracker custom integration to be used “in between” raw device tracker entities and a person entity. I.e., use the composite to combine the multiple trackers, and then have the person entity just use the composite tracker as its input.
Those 2 are oki for away from home tracking, you need something to a more instant “i m home” method and will bind you at home until you leave. Does your router supported? use router device tracker, also if you use static local IP for each phone your can also use Ping (ICMP) and NMAP and make use “consider_home” setting in each of them
Thanks for the reply, I do have precise location enabled, taking a look at your integration now. I know originally I had several items in my person, because at times I’d have to sit and wait for my garage door to open, and then I made the home area much larger which helps both issues. It would be nice if any one item indicating home would mark me home, but ALL would need to be true to make me not_home
Thanks for the reply, I have a pretty stout UniFi system, and I do use static IP’s for pretty much everything other than guests. I have just opened tabs for the links you sent, will take a look, thanks again.
If you have a good read of this, it will make more sense, It is very well thought out. Ones can tell there a lot of effort go into it. It not a simple “groups” of entities.
It will mark you home immediately if you use one of the router base tracker. Not need all to be true, It treated different type of tracking differently for marking you home or not home. I have an automation when my gps trackers changes home or not_home it will refreshes my stationary tracker, if the stationary base trackers change it will refresh my gps tracker that way the person tracker is more reliable . it work quite well for alarm. It need to switch off quickly before person open the door and not activate while person still at home.