Help arrival of home zone and firing open gate/ garage automations without false positives

I’m trying to set up an automation for my wife and I when we arrive home to open our driveway gate. There certainly are conditions which would need to be true in order to trigger additional actions but I haven’t figured out the best way to go about configuring this.

What I currently have set-up:
-we both are using Life360 to track us entering home zone (it appears to be working alright)
-I have MyQ integration set up for my driveway gate and for my two garage doors
-I have a Phillips hue outdoor motion sensor right in front of my Gate which appears to be working just fine.

Problem:
I used to have the following trigger, Either myself of my wife enters home zone, and with a condition that if life360 detects we’re driving then open the Gate and open the garage door.
(this was working pretty good). Except a couple times my wife was actually away and driving… but I was walking my dog around the block. When I arrived home the gate opened…and it shouldn’t have. It did because my wife was driving…so the logic I had built was a bit flawed.

I since then installed the motion detector thinking that would help me make this automation work better.

Unfortunately now I’m noticing that HA says we’re entering home zone when we’re 1/2 block away still… and the condition of motion detector senses motion happens to far afterward that the automation doesn’t work.
The automation was if we arrive home and the motion detector detects motion open gate.

Now I’m open to new suggestions on how to ‘program’ this- but what I was thinking was having an “arriving” state or something where after we enter home zone, the arriving variable is set to true for 5 minutes or something…
Then in separate automation, if the motion detector is triggered and a condition of arriving = true, then proceed with opening the gate, etc.

Is this even possible?

Sorry I can’t help, but it’s something I’d be interested in too

Is there a pretty standard amount of time you take when walking the dog around the block?

I Have A wemos plug into cig lighter

which has this code on it.

# Insert your SSID and Your PWD after inital setup
wifi:
  networks:
    ssid: "bla"
    password: "bla"


substitutions:
  devicename: mr2
  friendly_name: MR2
  

esphome:
  name: $devicename
  platform: ESP8266
  board: d1_mini

ota:


logger:
  level: VERBOSE
  logs:
    mqtt.component: DEBUG
    mqtt.client: ERROR




mqtt:
  broker: 192.168.bla
  port: 1883
  username: mqttuser
  password: blabla

text_sensor:
  - platform: wifi_info
    ip_address:
      name: ${friendly_name} Ipaddress 


binary_sensor:
  - platform: status
    name: ${friendly_name}

then have this automation

- id: Cars Here Open Door
  alias: Cars Here Open Door
  initial_state: true
  trigger:
  - entity_id: binary_sensor.mr2 , binary_sensor.hrv
    platform: state
    to: 'on'
  condition:
  - condition: state
    entity_id: input_boolean.ok_open_g_door
    state: 'on'
  - condition: state
    entity_id: binary_sensor.garage_door
    state: 'off'
  action:
  - service: cover.open_cover
    entity_id: cover.garage_door

Couldn´t you just have the automation triggered and then within the automation have a “Wait for trigger” step which waits for the motion sensor to be triggered?

1 Like

I didn’t know that was possible. I can try. Thanks.

Perhaps try using 2 separate automations, one for each of you, so that way it’ll only follow through for one at a time, instead of her driving setting off you walking the dog.

I have our home zone set really tight (50m), using the HA app in high accuracy mode when within 2km, that seems to have taken care of my false positives. Only time I have issues is if the phone isn’t plugged into the car so updates aren’t as frequent, but that’s rare.