From 20db5508d21d6372bbc0a97b677dace2c958865d Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 8 May 2025 23:11:15 +0200 Subject: [PATCH] Added alarm notification to home-assistant --- home-assistant/ALARM- Notfication.yml | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 home-assistant/ALARM- Notfication.yml diff --git a/home-assistant/ALARM- Notfication.yml b/home-assistant/ALARM- Notfication.yml new file mode 100644 index 0000000..43babb2 --- /dev/null +++ b/home-assistant/ALARM- Notfication.yml @@ -0,0 +1,30 @@ +alias: "ALARM: Notification" +description: "" +triggers: + - trigger: template + value_template: "{{ states['binary_sensor.alarm_triggered'].state == 'on' }}" +conditions: [] +actions: + - action: script.send_dynamic_notification_to_devices + alias: Send critical notification to devices + metadata: {} + data: + id: "{{ note_id }}" + title: Alarm triggered + message: "{{ note_message }}" + notiftag: "{{ note_tag }}" + notificon: mdi-alarm + group: "{{ note_grp }}" + importance: critical + image: null + video: null + when: "{{ note_time }}" +variables: + note_id: alarm-{{ now().strftime('%Y-%m-%dT%H-%M-%S') }} + note_grp: alarm-{{ now().strftime('%Y-%m-%dT%H') }} + note_tag: alarm-{{ now().strftime('%Y-%m-%dT%H-%M-%S') }} + note_time: "{{ as_timestamp(now()) }}" + note_message: >- + Alarm was triggered. Alarm siren detected on {{ + now().strftime('%Y-%m-%d') }} at {{ now().strftime('%H:%M:%S') }} +mode: single