Home Zone Trigger not firing automation

Hello everyone! So simply, I have created an automation that will open my garage door 20 seconds after I’ve entered the home zone. Unfortunately it doesn’t seem to work if I use the zone trigger method. My automation below:

- alias: "Garage Door to Open"
  trigger:
    platform: zone
    entity_id: device_tracker.iphone
    zone: zone.home
    event: enter
  condition:
    condition: state
    entity_id: binary_sensor.garage_door
    state: "off"
  action: 
    - delay: "00:00:20"
    - service: notify.ios_hal9000beta
      data:
        title: "GARAGE DOOR"
        message: "Garage Door Opening"

I’ve only got the notification there for now as I want to make sure it works properly before I make it open the garage door. You can disregard the condition, as that’s only there to make sure the automation is fired only when the door is closed.

I want to use the zone trigger platform as I want the garage door to open only when my phone physically enters the radius. Every time I enter/exit the home zone, i get the notification from the HA app saying that I’ve left/entered the zone, but the automation doesn’t fire.

I know I can use the state of the phone to trigger the automation, but I’ve found this not to be reliable a lot of the times as NMAP does fail to register that the phone is at home and I don’t want the garage door opening at 3am.

I’ve never used the zone platform as a trigger so I’m pretty sure I’m doing something wrong here, any help appreciated.

PS. The HA app on my phone has “Always Allow” locations settings, so that’s not it.

I know, always the dump question, but as it still happens to me sometimes (and I should be aware of): the automation is turned on? :wink: :slight_smile: :smiley:

Yep, automation turned on…

Have you tried triggering it this way?
You can also drop the delay in your action section by putting it in the trigger.

 trigger:
    platform: state
    entity_id: device_tracker.iphone
    to: 'home'
    for:
      seconds: 20

BTW - try commenting out the condition until you get the trigger working correctly just in case that is the issue for some reason. Does the automation work if you manually trigger it in the UI?

I don’t want to use the phone state purely for this reason:

UPDATE: Since updating my HA iPhone app, I’ve had a new sensor pop out which is just a GPS tracker from the app, so have changed the entity to that one, will see if that works today.

You are already using the “phone state” in your zone based trigger. The GPS location is used to determine what zone you are in. If the location is in a configured zone then that will be the state of the device tracker. The trigger I posted for you is using the exact same device tracker as your zone based one. To my understanding, functionally it shouldn’t make a difference.

@icaman004
@jazzyisj

Hi I need to make the excact automation for my garage door. Does yours working ok? I made a few tries by myself but it triggers when I leave the home.zone too. ( I need to open the garage door when I enter the zone only)

Does the following working ok?

  • alias: “Garage Door to Open”
    trigger:
    platform: zone
    entity_id: device_tracker.iphone
    zone: zone.home
    event: enter
    condition:
    condition: state
    entity_id: binary_sensor.garage_door
    state: “off”
    action:
    • delay: “00:00:20”
    • service: notify.ios_hal9000beta
      data:
      title: “GARAGE DOOR”
      message: “Garage Door Opening”