Any chance you still have the code to share?
Code to share?
There is a way to do it but its clumsy. You can use the amaozon music App to add items to your library. Then using the Sonos S1 (and presumably S2) app you can navigate to Amazon Music and find the item you added to the library. You can then add this to Sonos Favourites. Sonos Favourites can be shown in the media browser of the custom Sonos Card. You can aso then use the settings, devices and services, entities tab to locate sonos favourites attributes giving you the code you need to call up the track in media player (will look like “FV:2/76”). You can only add a limited number of items to sonos favourites but this can include playlists, radio stations, albums etc. I think its about 70 you can add.
It looks like Amazon now has a proper API in beta testing. Web API Overview V1.0 | Amazon Music Web API
I haven’t contributed to HA, but I have Python skills. What would it take to integrate their API to a maturity similar to Spotify’s? Can someone point me to that integration in GitHub? (No promises, but I can chip away at it while I wait for AI models to train/test.)
All integrations are documented and have a direct link to their source code here Integrations - Home Assistant