Geo Automation not working

I have a alarmo setup and it works perfectly.

now i created an automation to arm and disarm, but now i have problem with arming.
When someone leaves the house the alarm starts arming, but it only must trigger when everyone leaves the house. What do need to change so it looks if both persons are gone before triggering the automation? Ìi use this:

alias: "GEO: Arm alarm"
description: Zet alarm aan als niemand thuis is
trigger:
  - platform: state
    entity_id:
      - person.1
    to: not_home
    for:
      hours: 0
      minutes: 0
      seconds: 15
  - platform: state
    entity_id:
      - person.2
    to: not_home
    for:
      hours: 0
      minutes: 0
      seconds: 15
condition:
  - condition: and
    conditions:
      - condition: state
        entity_id: binary_sensor.voordeur
        state: "off"
      - condition: state
        entity_id: binary_sensor.zijdeur
        state: "off"
      - condition: state
        entity_id: binary_sensor.balkon
        state: "off"
      - condition: state
        entity_id: binary_sensor.achterdeur
        state: "off"
action:
  - delay:
      hours: 0
      minutes: 1
      seconds: 0
      milliseconds: 0
  - service: alarmo.arm
    data:
      mode: away
      entity_id: alarm_control_panel.alarmo
      code: "xxxx"
mode: single

For disarming i use this below, this works fine because someone comes home it disarms:

alias: "GEO: Disarm alarm"
description: Zet alarm uit als iemand thuis komt
trigger:
  - platform: state
    entity_id:
      - person.1
    to: home
    for:
      hours: 0
      minutes: 0
      seconds: 15
  - platform: state
    entity_id:
      - person.2
    to: home
    for:
      hours: 0
      minutes: 0
      seconds: 15
condition:
  - condition: and
    conditions:
      - condition: state
        entity_id: binary_sensor.voordeur
        state: "off"
      - condition: state
        entity_id: binary_sensor.zijdeur
        state: "off"
      - condition: state
        entity_id: binary_sensor.balkon
        state: "off"
      - condition: state
        entity_id: binary_sensor.achterdeur
        state: "off"
action:
  - delay:
      hours: 0
      minutes: 0
      seconds: 15
      milliseconds: 0
  - service: alarmo.disarm
    data:
      entity_id: alarm_control_panel.alarmo
      code: "xxxx"
mode: single

I Think i fixed it by adding a condition:

  - condition: and
    conditions:
      - condition: state
        entity_id: person.1
        state: not_home
      - condition: state
        entity_id: person.2
        state: not_home

That will work most likely but checking whole home occupied state is better done by the state of zone.home. It is numeric and will contain the count of persons in the zone. When zero it’s vacant.

do you have an example of this in yaml code

sorry no, You’re using conditions so just use the editor, numeric state above 0, switch to YAML and there ya go.