I would like to have a notify group for devices in a zone like home or devices outside a zone.
My use case is door ring: Only phones at home shall show, that someone rings the door.
see code snipped below.
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.json.event == \"incoming_call\" }}"
sequence:
- choose:
- conditions:
- condition: template
value_template: "{{ is_state('person.casastroeh', 'home') }}"
sequence:
- service: notify.mobile_app_oneplus_a6003
data:
title: Door Ring
message: Ring ring!
data:
notification_icon: mdi:lock-open-variant
tag: door-ring-detected
timeout: 60
actions:
- action: OPEN_DOOR
title: Open door
- choose:
- conditions:
- condition: template
value_template: "{{ is_state('person.jannes', 'home') }}"
sequence:
- service: notify.mobile_app_jannes_handy
data:
title: Door Ring
message: Ring ring!
data:
notification_icon: mdi:lock-open-variant
tag: door-ring-detected
timeout: 60
actions:
- action: OPEN_DOOR
title: Open door
- choose:
- conditions:
- condition: template
value_template: "{{ is_state('person.pia', 'home') }}"
sequence:
- service: notify.mobile_app_pia_moto_g_30
data:
title: Door ring
message: ring ring
data:
notification_icon: mdi:lock-open-variant
timeout: 60
tag: door-ring-detected
actions:
- action: OPEN_DOOR
title: Open door
- choose:
- conditions:
- condition: template
value_template: "{{ is_state('person.anja', 'home') }}"
sequence:
- service: notify.mobile_app_anja_handy_moto_g8
data:
title: Door ring
message: ring ring
data:
notification_icon: mdi:lock-open-variant
timeout: 60
tag: door-ring-detected
actions:
- action: OPEN_DOOR
title: Öffne Tür