# Alarm: Aknowledge Alarms\r
#\r
# Actions:\r
+# - persistent_notification.dismiss\r
# - script.stop_alarm\r
######################################################################\r
- alias: "Alarms: Riconoscimento Allarmi"\r
start_alarm_level_1:
alias: "Allarmi: Attiva Allarme 1"
sequence:
+
+ - condition: template
+ value_template: >-
+ {# Check Null Input #}
+ {% if level | length == 0 %}
+ {% set level = 1 %}
+ {% endif %}
+ {% if level | int >= 1 %}
+ true
+ {% else %}
+ false
+ {% endif %}
+
- service: script.notify_all
data_template:
volume_level: 0.4
{{ message }}
enable_persistent: 1
notification_id: "alarm"
-# - service: input_boolean.turn_on
-# entity_id: input_boolean.{{ alarm_type }}
+
+######################################################################
+# Alarm: Start Alarm Level 2
+# Inputs:
+# - level
+#
+# Operations:
+# - start_alarm_sound
+######################################################################
+
+start_alarm_level_2:
+ alias: "Allarmi: Attiva Allarme 2"
+ sequence:
+
+ - condition: template
+ value_template: >-
+ {# Check Null Input #}
+ {% if level | length == 0 %}
+ {% set level = 1 %}
+ {% endif %}
+ {% if level | int >= 2 %}
+ true
+ {% else %}
+ false
+ {% endif %}
+
+ - service: script.start_alarm_sound
######################################################################
# Alarm: Start Alarm
data_template:
title: "{{ title }}"
message: "{{ message }}"
+ level: "{{ level }}"
+
+ - service: script.start_alarm_level_2
+ data_template:
+ title: "{{ title }}"
+ message: "{{ message }}"
+ level: "{{ level }}"
######################################################################
# Alarm: Stop Alarm
#
# Operations:
+# - stop_alarm_sound
# - persistent_notification.dismiss
######################################################################
stop_alarm:
alias: "Allarmi: Disattiva Allarme"
sequence:
+ - service: script.stop_alarm_sound
+
- service: persistent_notification.dismiss
data_template:
notification_id: "alarm"
- binary_sensor.guard_mode
- binary_sensor.speech_notifications
- binary_sensor.text_notifications
+ - binary_sensor.alarms
- sensor.potenza_istantanea
cards:
- type: picture-glance
--zigbee2mqtt-networkmap-node-router-color: rgba(0, 165, 255, .7);
}
+######################################################################
+# Alarms
+######################################################################
+ - title: Allarmi
+ id: allarmi
+ icon: mdi:alarm-light-outline
+ badges:
+ - binary_sensor.alarms
+ cards:
+ - type: entities
+ title: Allarmi Casa
+ show_header_toggle: false
+ entities:
+ - input_boolean.alarms
+
######################################################################
# Weather
######################################################################