I’ve been working on something similar. I’ve set it up by tracking the last active sensor and then including that in the notification.
To do so, you will need an input_text entity which stores the last active sensor:
input_text:
recently_active_alarm_sensor:
name: Recently active alarm sensor
Then add two automations. The first tracks the most recently active sensor:
automation:
- alias: "Alarm: recently active"
trigger:
platform: state
entity_id: binary_sensor.master_bedroom_motion_sensor, binary_sensor.hallway_motion_sensor, binary_sensor.living_room_motion_sensor, binary_sensor.front_door
from: 'off'
to: 'on'
action:
service: input_text.set_value
data_template:
entity_id: input_text.recently_active_alarm_sensor
value: "{{ trigger.from_state.name }}"
The second triggers the notification on alarm.
automation:
- alias: "Alarm: triggered"
trigger:
platform: state
entity_id: alarm_control_panel.house_alarm
to: triggered
action:
service: notify.phones
data_template:
title: House Alarm Triggered
message: "Last active sensor: {{ states('input_text.recently_active_alarm_sensor') }}"
data:
push:
sound:
critical: 1
volume: 1.0
This example uses iOS notifications and sends them as ‘critical’ which means your phone will still make a sound even if your phone is on silent and will show in CarPlay etc.
Obviously change your entity_ids and notification service but it should be a start at least.