I am trying to achieve the following:
If any of the door sensors in a group trigger and actionable notification is sent to the iphone. At this moment a sound of a ticking clock plays warning me to disable the alarm or tak another action.
This all works.
What i want is if NO action is taken after 30 seconds that my phone plays another sound and the sirens around the house go off. I can not get that to work so on timeout or plain after 30 seconds play that sounds file,
This is my config so far:
- alias: 'Manual - Door sensor trigger alarm'
trigger:
- platform: state
entity_id: group.door_sensors
from: "off"
to: 'on'
condition:
condition: template
value_template: "{{states('alarm_control_panel.home_alarm') != 'disarmed'}}"
action:
- service: alarm_control_panel.alarm_trigger
entity_id: alarm_control_panel.home_alarm
- service: notify.Mynotifygroup
data_template:
title: 'Alarm'
message: >
{% for entity in trigger.to_state.attributes.entity_id %}
{% if states(entity) == 'on' %}
{{ state_attr(entity, 'friendly_name')}} is open
Alarm pending - disarm within 30 seconds
{% endif %}
{% endfor %}
data:
push:
sound:
name: "30secClock.wav"
critical: 1
volume: 1
actions:
- action: URI
title: Open dashboard
uri: /lovelace-alarm/default_view
- action: DISABLE_ALARM
title: Disarm alarm
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: DISABLE_ALARM
continue_on_timeout: false
- service: alarm_control_panel.alarm_disarm
target:
entity_id: alarm_control_panel.home_alarm
data:
code: 'xxxx'
- service: Mynotifygroup
data_template:
title: 'Alarm'
message: >
sounding alarm
data:
push:
sound:
name: "siren.wav"
critical: 1
volume: 1
Any help is appreciated or maybe there is even an easier way to achieve this.