kalkih / mini-media-player

Minimalistic media card for Home Assistant Lovelace UI
MIT License
1.48k stars 206 forks source link

Unable to join players to group #716

Closed notrelatedtoanyone closed 1 year ago

notrelatedtoanyone commented 1 year ago

I am unable to join players to a group, oddly enough.

I am definitely using the latest version as I only just installed it via HACS. To be sure, I also installed it manually (CLI method) and specified the version in the query parameter.

Whenever I join a player to a group, I see this error popup: Failed to call service media_player/join. required key not provided @ data['group_members']

I have the following configured in the card:

type: custom:mini-media-player
entity: media_player.living_room
hide:
  power: true
  source: true
speaker_group:
  platform: sonos
  show_group_count: true
  entities:
    - entity_id: media_player.living_room
      name: Living Room
    - entity: media_player.office
      name: Office
    - entity: media_player.bedroom
      name: Bedroom
FGOD1983 commented 1 year ago

Having the exact same issue

spaceboy76 commented 1 year ago

i have something similar, almost identical card but i get the error:

Failed to call service sonos/join. Service not found

I see from reading that sonos/join was replaced by media_player.join in August 2022 but as far as i can see this is embedded within the mini media player and i can't change this

spacegaier commented 1 year ago

i have something similar, almost identical card but i get the error:

Failed to call service sonos/join. Service not found

I see from reading that sonos/join was replaced by media_player.join in August 2022 but as far as i can see this is embedded within the mini media player and i can't change this

@notrelatedtoanyone I cannot reproduce your issue. I am on HA 2023.1.1 and card version 1.16.5. Grouping/joining Sonos players works fine for me.

@spaceboy76 You are talking about something different than the OP here.

You seem to not be using an up-to-date version of the mini-media-player card since I had back in last May adjusted the card coding via https://github.com/kalkih/mini-media-player/pull/656 to use media_player.join.

FGOD1983 commented 1 year ago

@notrelatedtoanyone @spacegaier I think I found the issue...

I got it working by using the following code for speaker_group:

  speaker_group:
    platform: media_player
    show_group_count: true
    entities:
      - entity_id: media_player.sonos_roam
        name: Sonos Roam
      - entity_id: media_player.woonkamer
        name: Sonos Play5 Woonkamer

The main difference is that I use media_player as platform now instead of sonos as they changed that a while ago, and I think that is why the problem occurs when you select platform sonos

spacegaier commented 1 year ago

I use platform: sonos in my setup without issues.

spaceboy76 commented 1 year ago

@spaceboy76 You are talking about something different than the OP here.

You seem to not be using an up-to-date version of the mini-media-player card since I had back in last May adjusted the card coding via #656 to use media_player.join.

i agree and thought the issue was with the mini-media-player-card, i just can't see how to update it. but reading your link right now. cheers

FGOD1983 commented 1 year ago

I use platform: sonos in my setup without issues.

that is weird as using platform sonos was causing the issue for me and changing it to media_player fixed it

spaceboy76 commented 1 year ago

ok - i've found my answer i think.

upgraded the mini-media-player-card but it also seems that you can't use the new music assistant entities with grouping, you have to continue to use the hidden sonos entities (music assistant entities listed under group management just remain greyed out). i guess this isnt an issue and at some point music assistant will add support for grouping, maybe within the music assitant interface

notrelatedtoanyone commented 1 year ago

Oddly enough, changing the platform to media_player did not solve it for me.

I have no idea what else I could try.

notrelatedtoanyone commented 1 year ago

I was using entity and not entity_id.

Easy one to miss and a classic one for me, surprised no one else caught it!