Hello
I have an entity called “Family” that is set to “home” when at least one person is at home.
It works, but I have a problem with zones. If I track myself using a standard home zone, it detects me too far away or too late (another issue I will post later - app would not send coordinates unless I open it)
I have created a custom zone and I want a person to be marked as “Home” when he/she is in that zone and not the default Home zone.
I have automations for leaving/entering that custom HomeZone, but how do I set the presence tracker to Home?
Do I have to create a custom device_tracker and link it to the person? How do I do that?
Or I somehow update the person’s entity state to “home” during the automation triggering event? Just tring to make it easier to update later on without having to remember where I have hardcoded things.
- There is only 1 “Home”, defined in HA
- You can alter the radius, though
- You cannot “set” a device tracker (unless you develop a custom integration that would allow to do that)
- A person is linked to device_trackers, e.g. the mobile app.
ok… So, question is - what is the most reliable way to set presence in HA? WIFI and BT?
Just today was testing automation that I setup to open the garage when I get home. It only detected that I was in the HomeZone 12 minutes after I got home =( By that time I opened the garage, gone in, closed it and then 12 minutes later it opened up again, as it detected that I am Home =)
you can do that manually but i don’t think it will help you in this situation. Unless you have something that gives GPS coordinates continuously then there is no way to know where that person is if not actually connected to a specific location.
setting aside the concept of the “home” zone, how would you know if the person is in that zone?
that’s completely dependent on your own equipment.
my wifi marks me as home within a minute or so after i get home. Still not accurate enough to open the garage for me before I get home but good enough as a secondary check for other uses. But I also have GPS based trackers to open my garage door when desired.
To do the garage door stuff you will have to have a GPS based tracker. a wifi or bluetooth detector will only ever show you as home AFTER you are home and connected to it.
I use Google Maps - Home Assistant
But whether the updates are timely depends on your phone, and especially the battery saving features of it.
Works very good for me, not so good with my wife’s phone.
ok. Setup an automation to alert me when my phone is entering or leaving HomeZone.
Added 3 entities:
- google map
- HA app
- Life360
See which one accurately reports first =)
Also you can enable high accuracy mode in the Home Assistant app, that should improve the, well, accuracy of the location it sends.
You can define the time interval and also to only enable it, when you are connected Bluetooth devices, let’s say your car.
If you’d like, you could create a binary sensor and set the type to presence. It will then correlate to home
/not_home
, this sensor you can set depending on an input boolean helper, which is set by your working automations. As a workaround that could work, but I agree, you should rather go to the bottom and the issue trying to resolve your poor location accuracy/updates instead of chasing the symptoms.
ok, out of all options still dont get a reliable detection of when I approach home. These are just a few zone clean script examples.
How do you do random part? =) Either random zones from an array or random scripts from an array?
robo_vacuum_back_corridor:
alias: Vacuum back corridor
sequence:
- service: vacuum.send_command
data:
entity_id: vacuum.rockrobo
command: zoned_cleanup
params:
zone_ids:
- back_corridor
mode: single
robo_vacuum_back_bathroom:
alias: Vacuum back bathroom
sequence:
- service: vacuum.send_command
data:
entity_id: vacuum.rockrobo
command: zoned_cleanup
params:
zone_ids:
- back_bathroom
mode: single