I found a fairly basic script to trigger Kodi to update it’s Library. I’d like to use an entity button to start the scan but I need to get the script in place first.
Here is the samle script:
script:
update_library:
alias: Update Kodi Library
sequence:
- alias: Call Kodi update
service: kodi.call_method
data:
entity_id: media_player.kodi
method: VideoLibrary.Scan
But when I try to take this and use the GUI to create it I am stumped.
The Name is pretty easy, the Entity ID is even easier (auto populate) and I assume for Mode I want Single (default)
It’s the sequence section that I run into problems
Action Type: Call Service (I assume)
Service: kodi.call_method
Which then give me a “Names of the Kodi entities where to run the API method” which I put in my Media_player.kodi
Then there is Service data which I filled in with “VideoLibrary.Scan”
When I try to save them I get this error message,
“Message malformed: expected dict for dictionary value @ data[‘sequence’][0][‘data’]”