Kodi - options for script

Hello,
The idea is play in the Kodi specific playlist by Spotify addon.
I have a query for the Kodi API like this:

{ “jsonrpc”: “2.0”, “method”: “Player.Open”, “params”: { “item”: { “directory”: “plugin://plugin.audio.spotify/?action=browse_playlist&ownerid=blabla&playlistid=0M0gcCx241hDfkmt5F7ys0/”}, “options”: { “shuffled”: true } }, “id”: 1}

It works. But now I want to convert it to a script in Home Assistant and I’m stuck.
Here is what I have already:

kodi_spotify:
  sequence:
  - service: media_player.kodi_call_method
    data:
      entity_id: media_player.kodi
      method: Player.Open
      item:
        directory: plugin://plugin.audio.spotify/?action=browse_playlist&ownerid=km4lin&playlistid=0M0gcCx241hDfkmt5F7ys0/

Where I should put:
options:
shuffled: true

I tried in various ways but nothing works.
I will be grateful for any help
Regards

Hi, any luck on this?

Nope :frowning:

Actually I figured out, sorry forgot to update the thread, see my config below:

spotify_discover_weekly:
  alias: Spotify Discover Weekly
  sequence:
  - service: kodi.call_method
    data:
      entity_id: media_player.kodi
      method: Player.Open
      item: {"directory": "plugin://plugin.audio.spotify/?action=browse_playlist&ownerid=spotify&playlistid=XXXXXXXXXXXX"}

Thanks! :slight_smile: