Added alarm notification to home-assistant
This commit is contained in:
parent
84f530bfc4
commit
20db5508d2
30
home-assistant/ALARM- Notfication.yml
Normal file
30
home-assistant/ALARM- Notfication.yml
Normal file
@ -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
|
||||
Loading…
Reference in New Issue
Block a user