Motion sensor triggered Spotify playlist

Hoping to get some help here!

I am new to HA and have just got my Aqara motion sensor automation to work, turning on a smart plug (lights) and turn it off again after 3 minutes of no motion. All good there…

Now, I would like to use the same trigger to play a specific Spotify playlist on my google nest mini. I have integrated both Spotify and Spotcast and am currently able to control my Spotify music manually with the front end. I just cannot get my automation to work…!

My yaml automation as-is:

`alias: Tænd soul covers ved bevægelse

trigger:

entity_id: binary_sensor.gaestetoilet_sensor

platform: state

to: “on”

action:

service: script.soul_covers

entity_id: media_player.gaestetoilet_musik`

My script as-is:

`entity_id: media_player.gaestetoilet_musik

uri: ‘spotify:playlist:5hiFsMw6qfQ2Lz4ScKADZ5’

random_song: true`

My log error:

voluptuous.error.MultipleInvalid: extra keys not allowed @ data[‘uri’]

Hello and welcome to the forum. Could you please edit your post and format your pasted automation config as per step 11 here: How to help us help you - or How to ask a good question

Indentation is important in YAML and at the moment it is not possible to see yours.