I have a collection of automations, scripts and python that is currently working well on my HA/MA setup. I’m considering turning it into a HACS integration if there’s interest.
The way it works is that you define “stations” with a prompt something like this:
“Classic Rock Foundations”: “Generate a playlist of classic rock songs from artists such as The Beatles, The Rolling Stones, The Kinks, Led Zeppelin, The Doors, Jefferson Airplane, Jimi Hendrix, The Byrds, The Animals, Steve Miller Band, The Who, The Zombies, Tom Petty, Van Morrison, Warren Zevon, Grand Funk Railroad, Free, Santana, Cream, Crosby Stills & Nash, The Eagles. Include similar songs and artists that fit the classic rock foundation style.”
It will generate an initial playlist and then call music_assistant.play_media which will match the track against your providers. It monitors the queue and reloads new tracks as it gets low, with deduping for a configurable number of tracks in history. I originally used “don’t stop the music”, but found for more niche stations it tended to drift and have more dups.
I have about 30 different prompts and have been using using this with my own library and Apple Music for several months and tweaking it along the way. It’s pretty solid for me at least, it’s been a fun way to expand my music listening too. If there’s interest I’ll see about making it a HACS integration. If not, I’ll just keep listening…