Presets for Music Players

In my home I’ve got some logitech squeeze boxes, as well as a yamaha receiver, all of which have basic home assistant integration, which is enough to hit the play / stop button.

In both cases I largely use these to play internet streams. The way these play on each is quite different. In order to build any sane automation rules, like tune into this stream at 7am, you really need a more abstract “set_preset_num(1)” and then some device specific configuration (that you could put in the yaml) for what that would be. On the squeezebox it might be a full url. On the yamaha you have to navigate down a vtuner tree (Bookmarks>Internet>Radio Paradise) to set the internet stream.

Mostly, I wanted to know what kind of top level device interfaces people thought would be good here to get into the contract for the media_player, and then could play around with implementation after.

Okay I’m quite confused as to what it is you are actually trying to achieve here. Maybe you can make an example?


Here are the scenarios.

It’s after 6am, when the living room lights are turned on, turn on the living room stereo and turn on NPR.

It’s 9am, if the living room stereo is still on, and on NPR, turn it to Radio Paradise.

This API - is the closest thing we have, but at least in my case, there are half a dozen presets that main sense here for common usage.

If there was a play_preset interface that took a number (1…N), it would also allow the media player web component to display a set of preset buttons on the web UI, which would let you do this kind of changing from the UI without having to build a scene for every single one sending down a cryptic media id.

But where would the “cryptic” media id be configured then?

Defined once per media player.

platform: yamaha
preset_1: “NET_RADIO: Bookmarks > Internet > Radio Paradise”
preset_2: “NET_RADIO: Bookmarks > Internet > WAMC”
preset_3: “Pandora”

That would both allow media player UI widgets to expose presets, as well as allow other parts of automation to have saved symbols outside of scenes to work with.

So those presets COULD be realized right now with services? Which you would place right underneath the media player component right?

(Sorry still trying to figure out if I really get what you are asking for)