Home-Assistant as music player

Hello,

there is no native support for that, but would the following scenary be even possible?

  1. Pair a bluetooth Speaker with docker-based Home-Assistant Server.
  2. Set up a Jellyfin Docker to support some media librarys
  3. Install the Jellyfin Integration to use Jellyfin and play music via BT (paired with HA)

Thx so far!

so long

You need to pair the Speaker with the Jellyfin addon and not with HA, then it could happen.
I do not know if that pairing is possible though.

I would suggest another machine for the media player, which could be a virtual one.
With this setup you can choose your combination of apps as your like and the connected gear would be easy to handle too, without HA restrictions.
I use this setup to run 3 MPD services controlled by 3 MyMPD interfaces outputting to 3 IceCast2 HTTP stream services and 3 SnapCast services. All on one small virtual machine on the same Proxmox hypervisor on my Intel i3 NUC, that also runs HA.
HA is then integrating the MyMPD media players and the SnapCast services, which is what HA excels in…Control!

I’d love to see more about how you’re controlling the MPD and Snapcast services from HA. I have both services set up in a docker, working, playing 1 ‘source’ to 3 different clients around my house. I use Rompr as the player frontend, which is cool because I can reach it from any of the 3 clients. Seems to be difficult through restarts & disconnect/reconnect, different groups and client names are created in HA. :face_with_spiral_eyes:

Yeah, SnapCast can be a mess unless you really take control of it.

I use Node Red to handle it.
In HA I have 3 input_text helpers containing a list of which players that are connected to each source.
And in Node Red I update these input_text helpers whenever a player change source.
The change of source is also handled in Node Red where the input_text helpers are used to determine if a source already is in use, so an existing group can be joined or if a new group have to be created.

Here is the Node Red flows.

[{"id":"d192304bade0868d","type":"trigger-state","z":"1b2407a2b1373505","g":"ccccadc4cc478f86","name":"SnapOS Bed Wall Group Change","server":"541ade28.b4a62","version":4,"inputs":0,"outputs":2,"exposeAsEntityConfig":"","entityId":"media_player.snapos_bed_wall_snapcast_client","entityIdType":"exact","debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"property","propertyValue":"new_state.attributes.source","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":""}],"customOutputs":[],"outputInitially":false,"stateType":"str","enableInput":false,"x":160,"y":90,"wires":[["8d996256a4d5e6cd"],["8d996256a4d5e6cd"]]},{"id":"c067e8be4ecf48c2","type":"trigger-state","z":"1b2407a2b1373505","g":"ccccadc4cc478f86","name":"SnapOS Bed Window Group Change","server":"541ade28.b4a62","version":4,"inputs":0,"outputs":2,"exposeAsEntityConfig":"","entityId":"media_player.snapos_bed_window_snapcast_client","entityIdType":"exact","debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"property","propertyValue":"new_state.attributes.source","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":""}],"customOutputs":[],"outputInitially":false,"stateType":"str","enableInput":false,"x":180,"y":45,"wires":[["8d996256a4d5e6cd"],["8d996256a4d5e6cd"]]},{"id":"9b4f83c8da4f618a","type":"trigger-state","z":"1b2407a2b1373505","g":"ccccadc4cc478f86","name":"SnapOS Office Group Change","server":"541ade28.b4a62","version":4,"inputs":0,"outputs":2,"exposeAsEntityConfig":"","entityId":"media_player.snapos_office_snapcast_client","entityIdType":"exact","debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"property","propertyValue":"new_state.attributes.source","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":""}],"customOutputs":[],"outputInitially":false,"stateType":"str","enableInput":false,"x":150,"y":135,"wires":[["8d996256a4d5e6cd"],["8d996256a4d5e6cd"]]},{"id":"0dc871e4c42bcc0b","type":"trigger-state","z":"1b2407a2b1373505","g":"ccccadc4cc478f86","name":"SnapOS Kitchen Group Change","server":"541ade28.b4a62","version":4,"inputs":0,"outputs":2,"exposeAsEntityConfig":"","entityId":"media_player.snapos_kitchen_snapcast_client","entityIdType":"exact","debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"property","propertyValue":"new_state.attributes.source","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":""}],"customOutputs":[],"outputInitially":false,"stateType":"str","enableInput":false,"x":160,"y":180,"wires":[["8d996256a4d5e6cd"],["8d996256a4d5e6cd"]]},{"id":"c8458b3784e0bab8","type":"trigger-state","z":"1b2407a2b1373505","g":"ccccadc4cc478f86","name":"SnapOS Living Room Group Change","server":"541ade28.b4a62","version":4,"inputs":0,"outputs":2,"exposeAsEntityConfig":"","entityId":"media_player.snapos_living_room_snapcast_client","entityIdType":"exact","debugEnabled":false,"constraints":[{"targetType":"this_entity","targetValue":"","propertyType":"property","propertyValue":"new_state.attributes.source","comparatorType":"is","comparatorValueDatatype":"str","comparatorValue":""}],"customOutputs":[],"outputInitially":false,"stateType":"str","enableInput":false,"x":170,"y":225,"wires":[["8d996256a4d5e6cd"],["8d996256a4d5e6cd"]]},{"id":"8d996256a4d5e6cd","type":"function","z":"1b2407a2b1373505","g":"ccccadc4cc478f86","name":"Count DWmusic Group Members","func":"var groups = [\"snapos_bed_wall\", \"snapos_bed_window\", \"snapos_kitchen\", \"snapos_living_room\", \"snapos_office\"];\nvar dwmusic1=\"\";\nvar dwmusic2=\"\";\nvar dwmusic3=\"\";\ngroups.forEach(group => {\n    if (typeof global.get('homeassistant').homeAssistant.states[\"media_player.\" + group + \"_snapcast_client\"].attributes.source != \"undefined\") {\n        if (global.get('homeassistant').homeAssistant.states[\"media_player.\" + group + \"_snapcast_client\"].attributes.source == \"DWMusic1\") {\n            if (dwmusic1 != \"\") dwmusic1 = dwmusic1 + \",\";\n            dwmusic1 = dwmusic1 + group;\n        }\n        if (global.get('homeassistant').homeAssistant.states[\"media_player.\" + group + \"_snapcast_client\"].attributes.source == \"DWMusic2\") {\n            if (dwmusic2 != \"\") dwmusic2 = dwmusic2 + \",\";\n            dwmusic2 = dwmusic2 + group;\n        }\n        if (global.get('homeassistant').homeAssistant.states[\"media_player.\" + group + \"_snapcast_client\"].attributes.source == \"DWMusic3\") {\n        if (dwmusic3 != \"\") dwmusic3 = dwmusic3 + \",\";\n            dwmusic3 = dwmusic3 + group;\n        }\n    }\n\n});\nmsg.dwmusic1 = dwmusic1;\nmsg.dwmusic2 = dwmusic2;\nmsg.dwmusic3 = dwmusic3;\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":515,"y":135,"wires":[["2fc72e1d99d39f26","6c82a0ac03a6cc04","a7f8950ce0533d9e"]]},{"id":"2fc72e1d99d39f26","type":"api-call-service","z":"1b2407a2b1373505","g":"ccccadc4cc478f86","name":"Post DW Music 1 Group Members","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.dw_music1_players"],"data":"{\"value\":msg.dwmusic1}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"last","x":845,"y":75,"wires":[[]]},{"id":"6c82a0ac03a6cc04","type":"api-call-service","z":"1b2407a2b1373505","g":"ccccadc4cc478f86","name":"Post DW Music 2 Group Members","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.dw_music2_players"],"data":"{\"value\":msg.dwmusic2}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"last","x":845,"y":135,"wires":[[]]},{"id":"a7f8950ce0533d9e","type":"api-call-service","z":"1b2407a2b1373505","g":"ccccadc4cc478f86","name":"Post DW Music 3 Group Members","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"input_text","service":"set_value","areaId":[],"deviceId":[],"entityId":["input_text.dw_music3_players"],"data":"{\"value\":msg.dwmusic3}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"last","x":845,"y":195,"wires":[[]]},{"id":"2e0510dc8f8ed1ae","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Bed Wall Source to DW Music 1","version":0,"debugenabled":false,"outputs":1,"entityConfig":"8b87ebc38c7b62ba","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_bed_wall_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 1","valueType":"str"}],"x":200,"y":330,"wires":[["5d3d593c697cf24e"]]},{"id":"5d3d593c697cf24e","type":"function","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Get players","func":"if (global.get('homeassistant').homeAssistant.states[msg.entity_id].attributes.source!=msg.source) {\n    var channel = msg.source.replace(\"DW Music \",\"\");\n    msg.player = global.get('homeassistant').homeAssistant.states[\"input_text.dw_music\"+channel+\"_players\"].state.toString().split(\",\")[0];\n    if (msg.player != \"\") msg.player = \"media_player.\" + msg.player + \"_snapcast_client\";\n    return msg;\n}","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":645,"wires":[["329ff8ab742251a7"]]},{"id":"f9667fcc6ad9e567","type":"switch","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Join existing or make new group","property":"player","propertyType":"msg","rules":[{"t":"empty"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":920,"y":645,"wires":[["b694f175ef0d0323"],["b32cc90c213298fd"]]},{"id":"329ff8ab742251a7","type":"api-call-service","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Unjoin","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"snapcast","service":"unjoin","areaId":[],"deviceId":[],"entityId":[],"data":"{\"entity_id\": msg.entity_id }","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":705,"y":645,"wires":[["f9667fcc6ad9e567"]]},{"id":"b32cc90c213298fd","type":"api-call-service","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Join existing group","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"snapcast","service":"join","areaId":[],"deviceId":[],"entityId":[],"data":"{\"master\":msg.player,\"entity_id\":msg.entity_id}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1165,"y":690,"wires":[[]]},{"id":"b694f175ef0d0323","type":"api-call-service","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Join new group","server":"541ade28.b4a62","version":5,"debugenabled":false,"domain":"media_player","service":"select_source","areaId":[],"deviceId":[],"entityId":[],"data":"{\"entity_id\":msg.entity_id,\"source\":msg.source}","dataType":"jsonata","mergeContext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1155,"y":600,"wires":[[]]},{"id":"9ca84bd55fcae405","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Bed Wall Source to DW Music 2","version":0,"debugenabled":false,"outputs":1,"entityConfig":"0246a2127fbe3fb4","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_bed_wall_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 2","valueType":"str"}],"x":200,"y":375,"wires":[["5d3d593c697cf24e"]]},{"id":"8539618b3c766dee","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Bed Wall Source to DW Music 3","version":0,"debugenabled":false,"outputs":1,"entityConfig":"2276e16fc58a6e47","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_bed_wall_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 3","valueType":"str"}],"x":200,"y":420,"wires":[["5d3d593c697cf24e"]]},{"id":"adfbecda6c33d47b","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Bed Window Source to DW Music 1","version":0,"debugenabled":false,"outputs":1,"entityConfig":"e7768f62a73bb463","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_bed_window_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 1","valueType":"str"}],"x":210,"y":465,"wires":[["5d3d593c697cf24e"]]},{"id":"dbec32fe787f1181","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Bed Window Source to DW Music 2","version":0,"debugenabled":false,"outputs":1,"entityConfig":"ec93be84cdc6f98c","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_bed_window_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 2","valueType":"str"}],"x":210,"y":510,"wires":[["5d3d593c697cf24e"]]},{"id":"2e2427360a6837ab","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Bed Window Source to DW Music 3","version":0,"debugenabled":false,"outputs":1,"entityConfig":"e763d523d4b8886b","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_bed_window_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 3","valueType":"str"}],"x":210,"y":555,"wires":[["5d3d593c697cf24e"]]},{"id":"1c9b8d41cbd82c40","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Kitchen Source to DW Music 1","version":0,"debugenabled":false,"outputs":1,"entityConfig":"206f7ce72436c06d","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_kitchen_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 1","valueType":"str"}],"x":200,"y":600,"wires":[["5d3d593c697cf24e"]]},{"id":"39f286fdadccd252","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Kitchen Source to DW Music 2","version":0,"debugenabled":false,"outputs":1,"entityConfig":"466bbe6b2a88a685","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_kitchen_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 2","valueType":"str"}],"x":200,"y":645,"wires":[["5d3d593c697cf24e"]]},{"id":"7d395190cb98c670","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Kitchen Source to DW Music 3","version":0,"debugenabled":false,"outputs":1,"entityConfig":"68e6707b21497bc3","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_kitchen_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 3","valueType":"str"}],"x":200,"y":690,"wires":[["5d3d593c697cf24e"]]},{"id":"119e725aa36d470e","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Living Room Source to DW Music 1","version":0,"debugenabled":false,"outputs":1,"entityConfig":"5d38641cf0feb0b0","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_living_room_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 1","valueType":"str"}],"x":210,"y":735,"wires":[["5d3d593c697cf24e"]]},{"id":"8f0ffbe0d7bb7547","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Living Room Source to DW Music 2","version":0,"debugenabled":false,"outputs":1,"entityConfig":"4da6ea352ae968a0","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_living_room_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 2","valueType":"str"}],"x":210,"y":780,"wires":[["5d3d593c697cf24e"]]},{"id":"cfc63dbc8c388bb8","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Living Room Source to DW Music 3","version":0,"debugenabled":false,"outputs":1,"entityConfig":"e8f4a37d51b03372","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_living_room_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 3","valueType":"str"}],"x":210,"y":825,"wires":[["5d3d593c697cf24e"]]},{"id":"7d840e5de1c75b0b","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Office Source to DW Music 1","version":0,"debugenabled":false,"outputs":1,"entityConfig":"936f4b9339aacd1b","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_office_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 1","valueType":"str"}],"x":190,"y":870,"wires":[["5d3d593c697cf24e"]]},{"id":"09995eeb1d0c1116","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Office Source to DW Music 2","version":0,"debugenabled":false,"outputs":1,"entityConfig":"7c819772962ee1b4","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_office_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 2","valueType":"str"}],"x":190,"y":915,"wires":[["5d3d593c697cf24e"]]},{"id":"64870f3e9a97311a","type":"ha-button","z":"1b2407a2b1373505","g":"1db46beff5019ebd","name":"Set SnapOS Office Source to DW Music 3","version":0,"debugenabled":false,"outputs":1,"entityConfig":"a6f86e0b107972b6","outputProperties":[{"property":"entity_id","propertyType":"msg","value":"media_player.snapos_office_snapcast_client","valueType":"str"},{"property":"source","propertyType":"msg","value":"DW Music 3","valueType":"str"}],"x":190,"y":960,"wires":[["5d3d593c697cf24e"]]},{"id":"e3cb6ec04cc3c9c4","type":"inject","z":"1b2407a2b1373505","g":"ccccadc4cc478f86","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"300","crontab":"","once":false,"onceDelay":"300","topic":"","payload":"","payloadType":"date","x":490,"y":240,"wires":[["8d996256a4d5e6cd"]]},{"id":"541ade28.b4a62","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"","connectionDelay":false,"cacheJson":false,"heartbeat":false,"heartbeatInterval":"","areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"numeric","statusMonth":"2-digit","statusDay":"2-digit","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"8b87ebc38c7b62ba","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Bed Wall Source to DW Music 1","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Bed Wall Source to DW Music 1"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"0246a2127fbe3fb4","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Bed Wall Source to DW Music 2","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Bed Wall Source to DW Music 2"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"2276e16fc58a6e47","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Bed Wall Source to DW Music 3","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Bed Wall Source to DW Music 3"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"e7768f62a73bb463","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Bed Window Source to DW Music 1","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Bed Window Source to DW Music 1"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"ec93be84cdc6f98c","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Bed Window Source to DW Music 2","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Bed Window Source to DW Music 2"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"e763d523d4b8886b","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Bed Window Source to DW Music 3","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Bed Window Source to DW Music 3"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"206f7ce72436c06d","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Kitchen Source to DW Music 1","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Kitchen Source to DW Music 1"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"466bbe6b2a88a685","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Kitchen Source to DW Music 2","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Kitchen Source to DW Music 2"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"68e6707b21497bc3","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Kitchen Source to DW Music 3","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Kitchen Source to DW Music 3"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"5d38641cf0feb0b0","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Living Room Source to DW Music 1","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Living Room Source to DW Music 1"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"4da6ea352ae968a0","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Living Room Source to DW Music 2","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Living Room Source to DW Music 2"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"e8f4a37d51b03372","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Living Room Source to DW Music 3","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Living Room Source to DW Music 3"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"936f4b9339aacd1b","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Office Source to DW Music 1","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Office Source to DW Music 1"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"7c819772962ee1b4","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Office Source to DW Music 2","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Office Source to DW Music 2"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false},{"id":"a6f86e0b107972b6","type":"ha-entity-config","server":"541ade28.b4a62","deviceConfig":"","name":"Set SnapOS Office Source to DW Music 3","version":"6","entityType":"button","haConfig":[{"property":"name","value":"Set SnapOS Office Source to DW Music 3"},{"property":"icon","value":"mdi:volume-high"},{"property":"entity_picture","value":""},{"property":"entity_category","value":""},{"property":"device_class","value":""}],"resend":false,"debugEnabled":false}]

In my GUI setup I use the mini media player lovelace card to control the MPD player and then I have conditional cards below with mute, volume and 3 buttons for my source selection that is linked to my Node Red scripts.

Here is a screenshot of the setup in edit mode.

And here is the same in live mode.

Here is the vertical stacked cards of one of my players.

type: vertical-stack
cards:
  - type: custom:mini-media-player
    entity: media_player.dw_music_2
    toggle_power: false
    volume_step: '3'
    max_volume: '100'
    min_volume: '1'
    group: false
    artwork: full-cover
    source: full
    name: DW Music 2
    volume_stateless: false
    sound_mode: full
  - type: conditional
    conditions:
      - entity: sensor.snapos_bed_wall_source
        state: DW Music 2
    card:
      type: custom:stack-in-card
      mode: horizontal
      cards:
        - type: custom:layout-card
          layout_type: custom:grid-layout
          layout:
            grid-template-columns: 15% auto 23%
            grid-template-rows: 34% 16% 17% 17% 16%
            grid-template-areas: |
              "center1 center1 right1"
              "left1 center2 right2"
              "left2 center2 right2"
              "left2 center2 right3"
              "left3 center2 right3"
          cards:
            - type: markdown
              content: SnapOS Bed Wall
              card_mod:
                style: |
                  ha-card {
                    box-shadow: none;
                    border: none;
                    margin: 0;
                  }
                  ha-markdown.no-header {
                    box-shadow: none;
                    padding: 0 0 0 16px;
                    border: none;
                    margin: 0;
                  }
              view_layout:
                grid-area: center1
            - type: custom:button-card
              entity: sensor.snapos_bed_wall_muted
              show_name: false
              show_icon: true
              color: var(--paper-item-icon-active-color)
              state:
                - value: 'False'
                  icon: mdi:volume-high
                - value: 'True'
                  icon: mdi:volume-off
              tap_action:
                action: call-service
                service: script.snapos_bed_wall_mute_toggle
              view_layout:
                grid-area: left2
            - type: entities
              entities:
                - type: custom:slider-entity-row
                  entity: media_player.snapos_bed_wall_snapcast_client
                  full_row: true
                  hide_state: true
                  min: 0
                  max: 100
                  step: 1
              card_mod:
                style: |
                  ha-card {
                    box-shadow: none;
                    border: none;
                    margin: 0;
                  }
                  ha-markdown.no-header {
                    box-shadow: none;
                    padding: 0 0 0 16px;
                    border: none;
                    margin: 0;
                  }
              view_layout:
                grid-area: center2
            - type: custom:button-card
              name: DW Music 1
              entity: sensor.snapos_bed_wall_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 1
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_bed_wall_source_to_dw_music_1
              view_layout:
                grid-area: right1
            - type: custom:button-card
              name: DW Music 2
              entity: sensor.snapos_bed_wall_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 2
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_bed_wall_source_to_dw_music_2
              view_layout:
                grid-area: right2
            - type: custom:button-card
              name: DW Music 3
              entity: sensor.snapos_bed_wall_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 3
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_bed_wall_source_to_dw_music_3
              view_layout:
                grid-area: right3
  - type: conditional
    conditions:
      - entity: sensor.snapos_bed_window_source
        state: DW Music 2
    card:
      type: custom:stack-in-card
      mode: horizontal
      cards:
        - type: custom:layout-card
          layout_type: custom:grid-layout
          layout:
            grid-template-columns: 15% auto 23%
            grid-template-rows: 34% 16% 17% 17% 16%
            grid-template-areas: |
              "center1 center1 right1"
              "left1 center2 right2"
              "left2 center2 right2"
              "left2 center2 right3"
              "left3 center2 right3"
          cards:
            - type: markdown
              content: SnapOS Bed Window
              card_mod:
                style: |
                  ha-card {
                    box-shadow: none;
                    border: none;
                    margin: 0;
                  }
                  ha-markdown.no-header {
                    box-shadow: none;
                    padding: 0 0 0 16px;
                    border: none;
                    margin: 0;
                  }
              view_layout:
                grid-area: center1
            - type: custom:button-card
              entity: sensor.snapos_bed_window_muted
              show_name: false
              show_icon: true
              color: var(--paper-item-icon-active-color)
              state:
                - value: 'False'
                  icon: mdi:volume-high
                - value: 'True'
                  icon: mdi:volume-off
              tap_action:
                action: call-service
                service: script.snapos_bed_window_mute_toggle
              view_layout:
                grid-area: left2
            - type: entities
              entities:
                - type: custom:slider-entity-row
                  entity: media_player.snapos_bed_window_snapcast_client
                  full_row: true
                  hide_state: true
                  min: 0
                  max: 100
                  step: 1
              card_mod:
                style: |
                  ha-card {
                    box-shadow: none;
                    border: none;
                    margin: 0;
                  }
                  ha-markdown.no-header {
                    box-shadow: none;
                    padding: 0 0 0 16px;
                    border: none;
                    margin: 0;
                  }
              view_layout:
                grid-area: center2
            - type: custom:button-card
              name: DW Music 1
              entity: sensor.snapos_bed_window_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 1
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_bed_window_source_to_dw_music_1
              view_layout:
                grid-area: right1
            - type: custom:button-card
              name: DW Music 2
              entity: sensor.snapos_bed_window_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 2
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_bed_window_source_to_dw_music_2
              view_layout:
                grid-area: right2
            - type: custom:button-card
              name: DW Music 3
              entity: sensor.snapos_bed_window_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 3
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_bed_window_source_to_dw_music_3
              view_layout:
                grid-area: right3
  - type: conditional
    conditions:
      - entity: sensor.snapos_kitchen_source
        state: DW Music 2
    card:
      type: custom:stack-in-card
      mode: horizontal
      cards:
        - type: custom:layout-card
          layout_type: custom:grid-layout
          layout:
            grid-template-columns: 15% auto 23%
            grid-template-rows: 34% 16% 17% 17% 16%
            grid-template-areas: |
              "center1 center1 right1"
              "left1 center2 right2"
              "left2 center2 right2"
              "left2 center2 right3"
              "left3 center2 right3"
          cards:
            - type: markdown
              content: SnapOS Kitchen
              card_mod:
                style: |
                  ha-card {
                    box-shadow: none;
                    border: none;
                    margin: 0;
                  }
                  ha-markdown.no-header {
                    box-shadow: none;
                    padding: 0 0 0 16px;
                    border: none;
                    margin: 0;
                  }
              view_layout:
                grid-area: center1
            - type: custom:button-card
              entity: sensor.snapos_kitchen_muted
              show_name: false
              show_icon: true
              color: var(--paper-item-icon-active-color)
              state:
                - value: 'False'
                  icon: mdi:volume-high
                - value: 'True'
                  icon: mdi:volume-off
              tap_action:
                action: call-service
                service: script.snapos_kitchen_mute_toggle
              view_layout:
                grid-area: left2
            - type: entities
              entities:
                - type: custom:slider-entity-row
                  entity: media_player.snapos_kitchen_snapcast_client
                  full_row: true
                  hide_state: true
                  min: 0
                  max: 100
                  step: 1
              card_mod:
                style: |
                  ha-card {
                    box-shadow: none;
                    border: none;
                    margin: 0;
                  }
                  ha-markdown.no-header {
                    box-shadow: none;
                    padding: 0 0 0 16px;
                    border: none;
                    margin: 0;
                  }
              view_layout:
                grid-area: center2
            - type: custom:button-card
              name: DW Music 1
              entity: sensor.snapos_kitchen_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 1
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_kitchen_source_to_dw_music_1
              view_layout:
                grid-area: right1
            - type: custom:button-card
              name: DW Music 2
              entity: sensor.snapos_kitchen_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 2
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_kitchen_source_to_dw_music_2
              view_layout:
                grid-area: right2
            - type: custom:button-card
              name: DW Music 3
              entity: sensor.snapos_kitchen_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 3
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_kitchen_source_to_dw_music_3
              view_layout:
                grid-area: right3
  - type: conditional
    conditions:
      - entity: sensor.snapos_living_room_source
        state: DW Music 2
    card:
      type: custom:stack-in-card
      mode: horizontal
      cards:
        - type: custom:layout-card
          layout_type: custom:grid-layout
          layout:
            grid-template-columns: 15% auto 23%
            grid-template-rows: 34% 16% 17% 17% 16%
            grid-template-areas: |
              "center1 center1 right1"
              "left1 center2 right2"
              "left2 center2 right2"
              "left2 center2 right3"
              "left3 center2 right3"
          cards:
            - type: markdown
              content: SnapOS Living Room
              card_mod:
                style: |
                  ha-card {
                    box-shadow: none;
                    border: none;
                    margin: 0;
                  }
                  ha-markdown.no-header {
                    box-shadow: none;
                    padding: 0 0 0 16px;
                    border: none;
                    margin: 0;
                  }
              view_layout:
                grid-area: center1
            - type: custom:button-card
              entity: sensor.snapos_living_room_muted
              show_name: false
              show_icon: true
              color: var(--paper-item-icon-active-color)
              state:
                - value: 'False'
                  icon: mdi:volume-high
                - value: 'True'
                  icon: mdi:volume-off
              tap_action:
                action: call-service
                service: script.snapos_living_room_mute_toggle
              view_layout:
                grid-area: left2
            - type: entities
              entities:
                - type: custom:slider-entity-row
                  entity: media_player.snapos_living_room_snapcast_client
                  full_row: true
                  hide_state: true
                  min: 0
                  max: 100
                  step: 1
              card_mod:
                style: |
                  ha-card {
                    box-shadow: none;
                    border: none;
                    margin: 0;
                  }
                  ha-markdown.no-header {
                    box-shadow: none;
                    padding: 0 0 0 16px;
                    border: none;
                    margin: 0;
                  }
              view_layout:
                grid-area: center2
            - type: custom:button-card
              name: DW Music 1
              entity: sensor.snapos_living_room_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 1
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_living_room_source_to_dw_music_1
              view_layout:
                grid-area: right1
            - type: custom:button-card
              name: DW Music 2
              entity: sensor.snapos_living_room_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 2
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_living_room_source_to_dw_music_2
              view_layout:
                grid-area: right2
            - type: custom:button-card
              name: DW Music 3
              entity: sensor.snapos_living_room_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 3
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_living_room_source_to_dw_music_3
              view_layout:
                grid-area: right3
  - type: conditional
    conditions:
      - entity: sensor.snapos_office_source
        state: DW Music 2
    card:
      type: custom:stack-in-card
      mode: horizontal
      cards:
        - type: custom:layout-card
          layout_type: custom:grid-layout
          layout:
            grid-template-columns: 15% auto 23%
            grid-template-rows: 34% 16% 17% 17% 16%
            grid-template-areas: |
              "center1 center1 right1"
              "left1 center2 right2"
              "left2 center2 right2"
              "left2 center2 right3"
              "left3 center2 right3"
          cards:
            - type: markdown
              content: SnapOS Office
              card_mod:
                style: |
                  ha-card {
                    box-shadow: none;
                    border: none;
                    margin: 0;
                  }
                  ha-markdown.no-header {
                    box-shadow: none;
                    padding: 0 0 0 16px;
                    border: none;
                    margin: 0;
                  }
              view_layout:
                grid-area: center1
            - type: custom:button-card
              entity: sensor.snapos_office_muted
              show_name: false
              show_icon: true
              color: var(--paper-item-icon-active-color)
              state:
                - value: 'False'
                  icon: mdi:volume-high
                - value: 'True'
                  icon: mdi:volume-off
              tap_action:
                action: call-service
                service: script.snapos_office_mute_toggle
              view_layout:
                grid-area: left2
            - type: entities
              entities:
                - type: custom:slider-entity-row
                  entity: media_player.snapos_office_snapcast_client
                  full_row: true
                  hide_state: true
                  min: 0
                  max: 100
                  step: 1
              card_mod:
                style: |
                  ha-card {
                    box-shadow: none;
                    border: none;
                    margin: 0;
                  }
                  ha-markdown.no-header {
                    box-shadow: none;
                    padding: 0 0 0 16px;
                    border: none;
                    margin: 0;
                  }
              view_layout:
                grid-area: center2
            - type: custom:button-card
              name: DW Music 1
              entity: sensor.snapos_office_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 1
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_office_source_to_dw_music_1
              view_layout:
                grid-area: right1
            - type: custom:button-card
              name: DW Music 2
              entity: sensor.snapos_office_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 2
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_office_source_to_dw_music_2
              view_layout:
                grid-area: right2
            - type: custom:button-card
              name: DW Music 3
              entity: sensor.snapos_office_source
              show_label: true
              show_icon: false
              color_type: card
              color: var(--paper-item-icon-active-color)
              state:
                - value: DW Music 3
                  color: var(--paper-item-icon-color)
              tap_action:
                action: call-service
                service: button.press
                service_data:
                  entity_id: button.set_snapos_office_source_to_dw_music_3
              view_layout:
                grid-area: right3

Music assistant handles snapcast apparently. Never used snapcast so don’t know how it works. Its a good setup for handling you music.

Never used Music Assistant, but it seems like it only handle snapcast as input, where most want it for output, because it is the application that handle synchronization across multiple players.

Never the less, the real issue here is actually snapcast itself, which have a tendency to go nuts in creation of groups and my setup handle this by always joining new players to existing ones, if there is a player connected to the chosen source.