You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
Yes
The problem
The MA integration in HA seems to be incorrectly reporting the group_members attribute for media_player entities when using temporary sync groups. These group_members are listed in alphabetical order instead of being listed with the "master" player in the first position of this list.
Here are two different media player cards implementations, both of which check the first member of the media_player entity's group_members attribute to determine if a player is the "master" one in a group:
Observe maxi-media-player refuse to show or select the "Pizza Oven" source:
Observe maxi-media-player refuse to show media_player.pizza_oven in it's join/unjoin page:
Observe in HA's developer tools that the value of media_player.pizza_oven's group_members attribute is media_player.bar, media_player.pizza_oven (master is last) instead of media_player.pizza_oven, media_player.bar (master player first in list).
Additional Errors
The above demonstrates the weirdness that occurs when the "master" player is not listed first in the group_members list. So when we set up conditions in our favor, such that the alphabetically listing also has the "master" player first, I will show the intended behavior.
Though there is still one issue in this case as well.
Join two Sonos players to Music Assistant
Name one "Bar" and the other "Pizza Oven". The names do not matter, just make sure it is clear which one comes first alphabetically.
Set up the MA integration in HA.
Use MA to start playing music on "Bar" (the one that comes first alphabetically), then add "Pizza Oven" using the checkbox in MA.
Set up maxi-media-player in HA with the two entities:
Observe that maxi-media-player does allow you to control the "Bar" media player and additionally shows that "Pizza Oven" is synced as well:
But observe on the join/unjoin page that "Pizza Oven" is listed twice!
Additionally observe that the value of media_player.bar's group_members attribute is an empty string instead of media_player.pizza_oven, media_player.bar (showing bar is in a group, but not the master player).
Music Providers
In this case, I was testing out with the Plex Music Provider, but the error also occurs when no music is playing or queued at all. The issue is a data syncing issue with Home Assistant.
Player Providers
I've tried this with the Sonos player provider only. Unfortunately I do not have access to other players. As stated, this was tested using Temporary Sync groups.
Full log output
N/A
Additional information
The reproduction steps show the problem when playback is initiated in MA's UI. But I have observed this very same incorrect data in the entity attributes when using the media_player.join and media_player.unjoin actions from HA as well.
What version of Home Assistant Core are your running
2025.2.5
What type of installation are you running?
Home Assistant Container
On what type of hardware are you running?
Linux
The text was updated successfully, but these errors were encountered:
This leads me to believe that the MusicAssistant integration is currently not in line with other media_player integrations. While this may not be a strict requirement of how group_members must be populated, I would still consider this a compatibility bug due to the strong precedence of many other integrations following this pattern.
What version of Music Assistant has the issue?
2.4.0
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
The problem
The MA integration in HA seems to be incorrectly reporting the
group_members
attribute formedia_player
entities when using temporary sync groups. Thesegroup_members
are listed in alphabetical order instead of being listed with the "master" player in the first position of this list.Here are two different media player cards implementations, both of which check the first member of the media_player entity's
group_members
attribute to determine if a player is the "master" one in a group:Because of this incorrect listing, both cards show buggy or incorrect information when trying to group players or play media for a group.
How to reproduce
Main Reproduction Steps
maxi-media-player
in HA with the two entities:maxi-media-player
refuse to show or select the "Pizza Oven" source:maxi-media-player
refuse to showmedia_player.pizza_oven
in it's join/unjoin page:media_player.pizza_oven
'sgroup_members
attribute ismedia_player.bar, media_player.pizza_oven
(master is last) instead ofmedia_player.pizza_oven, media_player.bar
(master player first in list).Additional Errors
The above demonstrates the weirdness that occurs when the "master" player is not listed first in the
group_members
list. So when we set up conditions in our favor, such that the alphabetically listing also has the "master" player first, I will show the intended behavior.Though there is still one issue in this case as well.
maxi-media-player
in HA with the two entities:maxi-media-player
does allow you to control the "Bar" media player and additionally shows that "Pizza Oven" is synced as well:media_player.bar
'sgroup_members
attribute is an empty string instead ofmedia_player.pizza_oven, media_player.bar
(showing bar is in a group, but not the master player).Music Providers
In this case, I was testing out with the Plex Music Provider, but the error also occurs when no music is playing or queued at all. The issue is a data syncing issue with Home Assistant.
Player Providers
I've tried this with the Sonos player provider only. Unfortunately I do not have access to other players. As stated, this was tested using Temporary Sync groups.
Full log output
N/A
Additional information
The reproduction steps show the problem when playback is initiated in MA's UI. But I have observed this very same incorrect data in the entity attributes when using the
media_player.join
andmedia_player.unjoin
actions from HA as well.What version of Home Assistant Core are your running
2025.2.5
What type of installation are you running?
Home Assistant Container
On what type of hardware are you running?
Linux
The text was updated successfully, but these errors were encountered: