Location based automation not working when 2 people leave at the same time

Hello,

I have an automation set up to trigger when we (iphone & android) leave the house (away). If one of is is “home” the automation doesn’t trigger. The automation works if we leave if separate vehicles at the same time or separate times but doesn’t work if we leave together in the same vehicle. It has be baffled. any insight would be helpful. The phone companion is installed and location is turned on on both mobile devices and shows we are both away correctly.

alias: Location - Kieth & Susan Leaving
description: ""
triggers:
  - entity_id:
      - person.kieth_smith
    to: not_home
    enabled: true
    trigger: state
  - trigger: state
    entity_id:
      - person.susan
    to: not_home
conditions:
  - condition: and
    conditions:
      - condition: state
        entity_id: person.kieth_smith
        state: not_home
      - condition: state
        state: not_home
        entity_id: person.susan
actions:
  - device_id: 8d7b5e6cb372701cfb3b4b888944c247
    domain: lock
    entity_id: b52c5824ab35ae8df0f59215a59e0305
    type: lock
  - data: {}
    target:
      entity_id: cover.ryobi_gdo_door_987bf3124600
    enabled: true
    action: cover.close_cover
  - target:
      entity_id: scene.lights_off
    metadata: {}
    action: scene.turn_on
  - type: turn_off
    device_id: 756e5704d13919b4460b35d7b4697ec2
    entity_id: da4de92e05674ff303f777d2a4d980d8
    domain: switch
  - device_id: fca88615e5fb96bc0a46599c7155d153
    domain: alarm_control_panel
    entity_id: alarm_control_panel.alarmo
    type: arm_away
  - device_id: 1da732f2d6b1a5f251303f54bec0368f
    domain: climate
    entity_id: ded3aeedb919ee3633b2ffe3ef97a570
    type: set_preset_mode
    preset_mode: away
mode: single

Use the state of zone home.

It is an integer that has the count of your tracked persons in the home zone.

When it’s >= 1 the home is occupied
When it’s == 0 the house is vacant.

Set automation accordingly.

If it’s less than zero you have an interdimensional portal sucking people out of your house.

2 Likes

Thanks I will give that a try!

Use a group and put both of you in the one group, then just check the status of that group, e.g.

# is anyone home?
somebody_home:
  name: Somebody is home
  entities:
    - person.susan
    - person.kieth
  all: false

Smart Home Junkie has a good video on how to do this on YouTube.

Thanks everyone, I did get it working correctly.