Delay on sending spotify to my receiver (spotify connect)

hi, small question, i have created a small script that i activate with my google home, see below
only when my received is completly turned off, it doesnt start from the first time

i have this error:
spotipy.client.SpotifyException: http status: 404, code:-1 - https://api.spotify.com/v1/me/player/play:
No active device found

when i fire the script, it does turn on the denon though, but the play doesnt start, when i launch the script again, it starts playing the playlist, so i think in need to configure a delay or something in the script sequence?

maybe i need to turn on the receiver first, then delay, and the the script / sequence below?

here is script :

spotify_favorite1:
  alias: Spotify MNM
  sequence:
  
  -  service: media_player.select_source
     data_template: 
       entity_id: media_player.spotify
       source: Denon AVR-X4000
  -  service: media_player.volume_set
     data:
       entity_id: media_player.denon_avrx4000
       volume_level: 0.15          
  -  service: media_player.play_media
     data:
       entity_id: media_player.spotify
       media_content_id: spotify:user:1112984459:playlist:3ubAuVo0RldsGEogXJTOAS
       media_content_type: playlist

ok think in found it
just pasted this line - delay: ‘00:00:13’
just before the service play_media

did you manage to play a playlist using an automation?

not using this anymore, i now use a lovelace spotify card or google assistant for spotify