Spotify Playlist template

Are you sure the entity_id is correct?
Since your friendly name is “Playlists sensor” I’d assume the sensors id is sensor.playlists_sensor instead of sensor.playlist_sensor
So maybe try again with

{{ state_attr("sensor.playlists_sensor", "playlists") | random }}

or

{{ (state_attr("sensor.playlists_sensor", "playlists") | random)['uri'] }}

depending on what data you need.

1 Like