kalkih / mini-media-player

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

Squeezebox Speaker Group not working #480

Open Manlycookiebear opened 3 years ago

Manlycookiebear commented 3 years ago

Hello,

I have several Squeezebox Speakers and tried to use the speaker group functionality, which is not working for me. I have used the example configuration.

The error I receive is: Failed to call service squeezebox/sync. required key not provided @ data['other_player']

I can group my speakers when issuing a service call through the Home Assistant GUI.

kalkih commented 2 years ago

Still having this issue?

other_player should be sent with the sync action. https://github.com/kalkih/mini-media-player/blob/dee019f9fb626ca704ac025bbfb26979246166ea/src/model.js#L357-L361

jab144 commented 2 years ago

Hello,

Has this been fixed? I still get this error in v 1.15.0.

Thanks

kalkih commented 2 years ago

Hello, since I got no response from the author of the issue I closed it.

I've again read the Squeezebox integration docs and the card implementation still seems correct to me, see it posted above.

Are you able to call the service successfully manually and can you provide an example service call?

jab144 commented 2 years ago

I am able to do it from Developer tools in Home Assistant

service: squeezebox.sync
data:
  other_player: media_player.squeezelite_2
target:
  entity_id: media_player.picoreplayer

But if I do it from the lovelace card I get

The error I receive is: Failed to call service squeezebox/sync. required key not provided @ data['other_player']

The GROUP ALL button is what gives me this error.

kalkih commented 2 years ago

Thanks. Is it only when using the group all button? Can you use the switches to group them one by one without issues?

jab144 commented 2 years ago

Yeah it appears doing them individually works. Just not the GROUP ALL button.

kalkih commented 2 years ago

Okay, so I know what the issue is now. The Squeezebox HA integration doesn't support grouping multiple entities at once, unlike most (or even all?) other speaker group implementations in HA.

I would suggest opening an issue/feature request in the core HA repository for this functionality.

We could also try to solve it in this card by doing multiple service calls in sequence (one for each entity to group) instead of one with all entities. It would be a one off solution so not ideal and it might not even work depending on how fast the integration can recognize and react on the service calls.

jab144 commented 2 years ago

Okay. Thanks for looking and the work on this.