Basic Kodi Script Problems

I’m new to HA, and I wanted to start with a simple script to play a random movie from an existing Kodi installation (LibreELEC, to be precise). The Kodi instance shows up nicely in my HA overview, but I’m having real trouble figuring out how to control it from a HA script. My understanding thus far is that I’m supposed to make a call to kodi.call_method, and then specify the “Name(s) of the Kodi entities where to run the API method”. I don’t see my Kodi instance in the “devices list”, or even the “entities” list, so I don’t know how to specify it in the script definition, and I can’t figure out how to pass data to the call_method either. Can someone show me how this is done?

@steve2020, if you look at this thread it will get you halfway there, you will have to come up with some trickery to grab a random movie.