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’]
Hey i know it´s an old topic, but i have the same issue.
I can trigger the automation with any other trigger, except with motion. Where is my misstake?
The software is running on RBPI4
Thanks for your help.