@kylepotts added Search 🥇
It works by providing the data field "search" ie:
service: spotcast.start
data:
entity_id: media_player.cuisine
random_song: true
shuffle: true
search: between the buried and me
Currently the code will only do a search request if the Uri field is empty. The flow of the search is has followed:
Intercept if Uri is none or empty
Get the most relevant result from each searchType (artist, album, track, and playlist)
Sort the results according the most identical to the search query
Set the Uri to the one of the results in index zero of the list
Continue the usual flow of the component
...
In case multiple results are identical, the priority will be artist->album->track->playlist. Let's take the search exemple "Between the buried and me". We have a song called "between the buried and me" on an album of the same name from a band of the same name. The uri that is returned will be the one from the artist.