I’m using the Alexa Media Player custom integration to make a home alarm system. I have two automations, one for notification when alarm is triggered (with sound) and one for turning off the sound if alarm is disarmed. The first is working, but the second never kicks in.
Notification:
alias: Send notification when home alarm is triggered
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
to: triggered
action:
- service: notify.pushover
data:
message: Alarm, husalarmen er utløst!
- repeat:
count: '3'
sequence:
- service: notify.alexa_media
data:
message: >-
<audio
src="soundbank://soundlibrary/scifi/amzn_sfx_scifi_alarm_04"/>
target: media_player.yngve_s_echo
data:
type: tts
mode: single
Turn off alarm sound if alarm is disabled:
alias: 'Alarm: Slå av alarmlyd'
description: ''
trigger:
- platform: state
entity_id: alarm_control_panel.home_alarm
from: armed_away
to: disarmed
condition: []
action:
- service: media_player.turn_off
target:
entity_id: media_player.yngve_s_echo
mode: single
I’ve also tried - service: media_player.volume_mute
Anyone got some thoughts?