Cannot run spotcast from script

Tags: #<Tag:0x00007f326f3b3460> #<Tag:0x00007f326f3b3320>

Hi, im not an expert in hass but learning. The problem is that i installed spotcast and only able to call the service from developer tools and neitherbfrom autoamtions or script, getting this error: voluptuous.error.MultipleInvalid: expected dict for dictionary value @ data['entity_id'] and tied changing script syntax both from file and ui and got nothing. searched in internet and found nothing useful apart from a github issue where doesn’t solve the problem. Here is scripts.yml :

buenos_dias:
  alias: Buenos días
  sequence:
  - service: spotcast.start
    entity_id: media_player.mi_habitacion
    data:
      uri: playlist:6piHLVTmzq8nTix2wIlM8x
      random_song: true
  mode: single

Installed hassOs on rpi4 4GB.
Hope somebody can help, thanks

Move the entity_id: line under data: and indent it two spaces

Already tried. Doesn’t make any difference.

Let’s see what you have now. Also it looks like you need to start the URI with spotify: (and putting the entire thing in quotes would be a good idea)

This is what i have now:

buenos_dias:
  alias: Buenos días
  sequence:
  - service: spotcast.start
    data:
      entity_id: media_player.mi_habitacion
      uri: spotify:playlist:6piHLVTmzq8nTix2wIlM8x
      random_song: true
  mode: single

the spotify: in uri was a copy-paste error to here.

Now it works. Don’t know why, just tried again today and it works now. Thanks for help.