I setup a very basic automation to open my garage door whern my phone enters my “home” zone using person.scott_mallonee. I also have it setup to send me a notification when I enter the “home” zone.
When I drive up, I get the notification on my phone, but it takes about 30 seconds or so before the garage door opens. So it works, but just not quickly. If person.scott_mallonee (myself) enters zone.home, no conditions, and the action is Open Scott’s Garage Door.
When I pull up, I get the notification that I entered the “home” zone immediately. However, I have to sit there in front of the garage door for about 30 seconds before the garage door opens.
I’ve decreased the radius of my home zone to 40m in configuration.yaml to best fit my house, but I don’t think the radius matters as long as HA detects me being there as I drive up.
So if I receive the notification on my phone that I’ve entered the “home” zone right as I pull into the driveway, why is it that the automation doesn’t trigger for another ~30 seconds? It doesn’t make any sense to me! I mean, it works if you wait, but why wouldn’t the automation trigger immediately?
I setup a proximity sensor in HA this morning and attempted to edit the automations, but couldn’t figure out how to incorporate a proximity sensor as a trigger. Ed’s video wasn’t much help since HA ha changed so much since that video was made. The only attributes I can use are “dir of travel” and “nearest.” I am honestly unsure what to set as the trigger. Anyone have any examples of a trigger?
The garage door is controlled by a Meross MSG-100. It does work immediately when opening or closing from the HA GUI. It just has this 30(ish)-second delay after HA notifies me that I’ve arrived home. I also have the automation send me a notification when it triggers, just for troubleshooting purposes. Here is the automation yaml:
alias: Open Scott's Garage Door when Entering Home Zone
description: ""
trigger:
- platform: zone
entity_id: person.scott_mallonee
zone: zone.home
event: enter
condition: []
action:
- device_id: 7ccab163838d3e50b5aff05992b3d58d
domain: cover
entity_id: cae24f84434efa2b222545037b775d21
type: open
- service: notify.mobile_app_scotts_iphone
data:
message: Garage door open
title: Garage Door Open
mode: single
alias: Open Scott's Garage Door when Entering Home Zone
description: ""
trigger:
- platform: numeric_state
entity_id: sensor.proximityinuse
below: 200
alias: " When ProximityInUse is below 200 meter"
condition: []
action:
- device_id: 7ccab163838d3e50b5aff05992b3d58d
domain: cover
entity_id: cae24f84434efa2b222545037b775d21
type: open
- service: notify.mobile_app_scotts_iphone
data:
message: Garage door open
title: Garage Door Open
mode: single
My guess is that the event uses the gps coordinates, while the notification also takes you connecting to wifi into account. Instead of using an event, have you tried a state condition for the state of person.scott_mallonee to change to home?
On a side note, if you have multiple ways of detecting home, such as router device trackers, be sure to put them in the person settings too, or use something like:
You should stop wondering and use the tools HA provides, specifically look at the automation’s traces. It is all time stamped. And you entering your home zone should also be timestamped somewhere. Then you can see when you enter the zone, when the automation is triggered, when the services are called, etc., etc.