punxaphil / custom-sonos-card

Home Assistant custom lovelace sonos card
193 stars 21 forks source link

problem with audio groups #498

Open ojm88 opened 2 weeks ago

ojm88 commented 2 weeks ago

Checklist:

Release with the issue:

Last working release (if known):

Browser and Operating System:

Description of problem:

Javascript errors shown in the web inspector (if applicable):

Additional information:

Hello. I'm experiencing a problem with audio groups. It looks like the first group you create works on activation. The groups that are 2-3, etc., are unable to connect together. I have video of the problem if anyone wants it?

punxaphil commented 1 week ago

Please share the video

ojm88 commented 1 week ago

https://github.com/user-attachments/assets/6e693c75-576e-4894-a738-63c6ae4b1b71

ojm88 commented 1 week ago

Thank you for your involvement in my problem. Am I the only one experiencing this problem? This is such an important functionality in the sonos card

punxaphil commented 1 week ago

Yes, to me it feels like an issue with your players/your sonos setup. This usually works for users without problems.

ojm88 commented 1 week ago

Hello. It works to group speakers with HA's own join option service call, and Sonos' original app.

I experience a much more stable grouping in the Sonos card, if the option "Skip Apply Button When Grouping" is switched off. But when this option is turned on, the problems start.

punxaphil commented 1 week ago

Please share your cardconfig yaml

cryptk commented 3 days ago

I just arrived at this issue experiencing the same problem. Just like @ojm88, the issue only happens with the skip apply when grouping option is enabled. Here is a working card config:

type: custom:sonos-card
sections:
  - volumes
  - groups
  - grouping
  - player
  - media browser
predefinedGroups:
  - name: Everywhere
    media: ""
    entities:
      - player: media_player.sonos_move
        volume: 40
      - player: media_player.office
        volume: 12
      - player: media_player.kitchen
        volume: 40
hideGroupCurrentTrack: false
dynamicVolumeSlider: true
showVolumeUpAndDownButtons: true
topFavorites:
  - ""
adjustVolumeRelativeToMainPlayer: true
hideBrowseMediaButton: false
mediaBrowserHideTitleForThumbnailIcons: false
artworkAsBackground: true

And here is a card config where grouping will initially appear to work, but the speakers will revert to being ungrouped within seconds:

type: custom:sonos-card
sections:
  - volumes
  - groups
  - grouping
  - player
  - media browser
predefinedGroups:
  - name: Everywhere
    media: ""
    entities:
      - player: media_player.sonos_move
        volume: 40
      - player: media_player.office
        volume: 12
      - player: media_player.kitchen
        volume: 40
hideGroupCurrentTrack: false
dynamicVolumeSlider: true
showVolumeUpAndDownButtons: true
topFavorites:
  - ""
adjustVolumeRelativeToMainPlayer: true
hideBrowseMediaButton: false
mediaBrowserHideTitleForThumbnailIcons: false
artworkAsBackground: true
skipApplyButtonWhenGrouping: true

The only change I performed is enabling the switch for Skip Apply Button When Grouping in the visual editor.