Hi guys,
I’m pretty new with home assistant. I installed it on my pi and I configured my denon AVR and also installed the spotify connect addon.
Now I can successfully see hassio in the spotify app and I can play music through home assistant.
To do so, the only configuration that I added in configuration.yml is
# Denon
media_player:
- platform: denonavr
host: 192.168.0.87
#name: NAME
show_all_sources: True
timeout: 10
zones:
- zone: Zone2
# name: NAME
Now, I wanted to create a script to start to play with some automation. What I wanted to do is to simply play a spotify playlist using my denon.
I was reading this thread that I think it’s a bit old now. I’ve tried all the scripts suggested there, the last one is
spotifydemo:
alias: 'Spotify Demo'
sequence:
- service: media_player.play_media
data:
entity_id: media_player.spotify
media_content_type: playlist
data_template:
media_content_id: >
{%- set plists = ["spotify:user:spotify:playlist:37i9dQZF1DX55dNU0PWnO5",
"spotify:user:spotify:playlist:37i9dQZF1DWVyfHu8SNQgH",
"spotify:user:spotify:playlist:37i9dQZF1DX9OTdoPfdJpF"
] -%}
{% set pindex = (range(0, (plists | length - 1 ) )|random) -%}
{{ plists[pindex] }}
but when I start the script, nothing happens and I don’t see any error. What am I doing wrong?
In addition, can you guys tell me where the entity_id media_player.spotify is coming from?