I’m thinking about extending the ‘openhome/linn’ media player integration to support a feature called ‘Pins’ (https://docs.linn.co.uk/wiki/index.php/Linn_DS/DSM_control#PINS), this can be thought of as a type of preset and as far as I’m aware there are 6 of them (though looking at the technical documentation, it would appear many more are possible).
I’ve just added it to the underlying library: https://github.com/bazwilliams/openhomedevice
Looking at some of the other media player integrations (Bluesound, Channel) appear to overloaded the media player ‘source’ with those channels or presets and put some logic in the integration to handle this. Onkyo appears to use the ‘play_media’ functionality to invoke a preset.
Since the openhome integration already supports a dynamic (and potentially long) list of sources, I’m a bit reluctant to merge them together. This is further complicated by the capability to ‘pin’ a source to a button - in this case, there would be two equally named entries in the choose source dropdown.
So my question to other developers is, what approach should I take? Is there an idea for an additional type of preset functionality in the media player component, should I consider adding one? Or is overloading/merging sources acceptable in this case?
Can this interact with the Nabu Casa Alexa integration? For example, the official Linn Alexa skill uses the ChannelController to permit pin selection (https://github.com/linn/linn-api-alexa-smart-home/blob/5f8a336846ec0537944a7e17ec5889bc0db74d01/src/handlers/ChannelControlHandler.ts).