Grouping of media_player domain (and HEOS)
See original GitHub issueHi @kalkih and thanks for your awesome card! I’ve used it for a long time, and also did a custom integration for HEOS to enable grouping. In HA 2021.12 grouping was added to the official integration of HEOS after a really long time and a architectural discussion on how to organize grouping of media players in HA.
However, we see some issues with the card in combination with your card. Basic grouping (1+1 player) works just fine, but trying to add a second player to the group it replaces the first player with the second one. According to the official HEOS integration docs all members should be part of the group_members call, not only the recently added. I do not know if this is the case for HEOS only, but I would believe that after such a long architectural discussion it had been decided that this is the way once the HEOS feature was added. Would you happen to know what is correct?
See the forum for discussions on the subject. Below an animation of what happens taken from the forum:
I did a tweak to my fork of your card in handleGroupChange:
case PLATFORM.MEDIAPLAYER:
let members = this.group;
members.shift() // remove master from list
members.push(entity); // add new entity to group
return this.callService(e, 'join', {
entity_id: this.entityId,
group_members: members,
}, platform);
and this seems to achieve what I want it to. I would be happy to propose a PR on this, but I would like to hear your opinion on how to do it first.
PS! Once done, HEOS should be added to the supported players list 😃
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top GitHub Comments
https://github.com/kalkih/mini-media-player/pull/607 now available in latest release, great stuff @tmjo 👍🏼
Great, I’ll propose a PR. Thought I had it ready, but ran into some issues with the Ungroup button (when ungrouping whole group), but it may be a temporary problem in my installation. I’ll do some more testing before presenting the PR.