Enter Zone automation

Hi all,

Perhaps the anwser to my question is easy, but i can’t figure it out.

i have a automation when me or my wife enter the zone Home.
and the alarm is active it sends a notification to both of us.

But how can i filter this like this: If Myself enters zone home, only send a notifcation to me.
or vice versa for my wife

- id: '1643025657659'
  alias: 'GEO: Alarm reminder'
  description: ''
  trigger:
  - platform: zone
    entity_id: device_tracker.person1
    zone: zone.home
    event: enter
  - platform: zone
    entity_id: device_tracker.person2
    zone: zone.home
    event: enter
  condition:
  - condition: device
    device_id: 40d9b19504b23f810406d42c8ef3f608
    domain: alarm_control_panel
    entity_id: alarm_control_panel.alarmo
    type: is_disarmed
  action:
  - service: notify.mobile_person1
    data:
      title: 'LET OP: Alarm staat aan!'
      message: Vergeet het alarm niet uit te zetten
  - service: notify.mobile_person2
    data:
      title: 'LET OP: Alarm staat aan!'
      message: Vergeet het alarm niet uit te zetten
  mode: single

Replace the action section of your automation with this:

  action:
  - variables:
      t: 'LET OP: Alarm staat aan!'
      m: 'Vergeet het alarm niet uit te zetten'
  - choose:
    - conditions: "{{ trigger.entity_id == 'device_tracker.person1' }}"
      sequence:
      - service: notify.mobile_person1
        data:
          title: '{{ t }}'
          message: '{{ m }}'
    default: []
  - choose:
    - conditions: "{{ trigger.entity_id == 'device_tracker.person2' }}"
      sequence:
      - service: notify.mobile_person2
        data:
          title: '{{ t }}'
          message: '{{ m }}'
    default: []
1 Like