31 lines
968 B
YAML
31 lines
968 B
YAML
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
|