I would like to play 2 custom sounds once an automation triggers but cant get it to work.
First when the automation triggers i would like to play the default alert sound on my iphone. After that i would like a clock to start ticking to alert me of the time i have to diarm the alarm.
This is what i have 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.<my mobile notification group>
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'
This works and if i change the 30secClock.wav to "default " the sound changes. How to combine this so i first get default sound and the a ticking clock?
Thanks for thinking along with me.