My goal when my automation triggers, in this order:
- Turn on my Denon receiver
- Wait 10 seconds for it to power on
- Set the volume
- Play a media file
This mostly works, except the delay runs first! I run the automation, it waits 10 seconds, my Denon receiver powers on and the media starts playing.
Do you have any idea how I can get this to work? I need the delay or the action to set the volume will not registry if the receiver is not on. No matter what I do the delay always runs first. I even broke this up into 3 scripts and ran that. No luck.
Here’s my automation
- id: '1590271192453'
alias: testing denon
description: Example of how to play a URL directly on the Denon AVR
trigger:
- device_id: fbfedf6ba1284100a3a26fe8f479e49e
domain: binary_sensor
entity_id: binary_sensor.front_door_sensor_4_0
platform: device
type: turned_on
condition: []
action:
- data: {}
entity_id: media_player.denon
service: media_player.turn_on
- delay: 00:00:10
- data:
volume_level: 0.25
entity_id: media_player.denon
service: media_player.volume_set
- data:
media_content_id: http://192.168.1.2:8080/media/sound/jr/JR%20DDG%20iOS%20Info.mp3
media_content_type: url
entity_id: media_player.denon
service: media_player.play_media