question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Speaker group sync_volume does not work with volume_stateless

See original GitHub issue

v1.2.2 (Never tried with an earlier version.)

Speaker group sync_volume works fine when volume_stateless: false but does not work when volume_stateless: true. In that case, only the volume of the master device changes.

sync_volume works in this example:

type: 'custom:mini-media-player'
volume_stateless: false
source: icon
artwork: full-cover
entity: media_player.dining_room_2
hide:
  controls: false
  icon: true
  info: false
  mute: true
  name: true
  power: true
  source: false
  volume: false
info: scroll
speaker_group:
  entities:
    - entity_id: media_player.dining_room_2
      name: Dining Room
    - entity_id: media_player.living_room
      name: Living Room
    - entity_id: media_player.kitchen
      name: Kitchen
      volume_offset: 15
    - entity_id: media_player.guest_room_2
      name: Guest Room
    - entity_id: media_player.library
      name: Library
    - entity_id: media_player.master_bedroom_2
      name: Master Bedroom
    - entity_id: media_player.study
      name: Study
    - entity_id: media_player.garden
      name: Garden
      volume_offset: 43
  expanded: false
  platform: sonos
  show_group_count: true
  sync_volume: true

sync_volume does not work in this example:

type: 'custom:mini-media-player'
volume_stateless: true
source: icon
artwork: full-cover
entity: media_player.dining_room_2
hide:
  controls: false
  icon: true
  info: false
  mute: true
  name: true
  power: true
  source: false
  volume: false
info: scroll
speaker_group:
  entities:
    - entity_id: media_player.dining_room_2
      name: Dining Room
    - entity_id: media_player.living_room
      name: Living Room
    - entity_id: media_player.kitchen
      name: Kitchen
      volume_offset: 15
    - entity_id: media_player.guest_room_2
      name: Guest Room
    - entity_id: media_player.library
      name: Library
    - entity_id: media_player.master_bedroom_2
      name: Master Bedroom
    - entity_id: media_player.study
      name: Study
    - entity_id: media_player.garden
      name: Garden
      volume_offset: 43
  expanded: false
  platform: sonos
  show_group_count: true
  sync_volume: true

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ronschaeffercommented, Jul 25, 2019

Ah, understood. I assumed that it was just stateless relative to the UI. That solution won’t work for my purposes if volume offset isn’t supported, but I suppose that it might help others since it may not be obvious that the behavior differs when volume is stateless.

My reason for looking at this was to have a larger or easier volume control for use on a wall-mounted tablet. In the event, I’ve taken your suggestion here volume slider and made a second card just for volume. That is much more usable on the tablet.

image

0reactions
dannymertenscommented, Mar 16, 2020

@ronschaeffer Hi your Sonos set-up looks awesome! I’m quite new to HA and to be honest not everything is always so clear to be honest, are you willing to share the configuration file so I can have a look how you got this configured? #151 (comment) Thanks in advance!!!

@dannymertens Here you go. I think that it’s probably overly complex and could be achieved more elegantly using some of the newer custom card types. I keep meaning to spend some time on it. If you’d like more info, you can message me with the same user name on the Home Assistant Community forum.

  - color_type: blank-card
    styles:
      card:
        - height: 10px
    type: 'custom:button-card'
  - cards:
      - entity_picture: /local/images/sonos_logo_light_grey.png
        show_entity_picture: true
        styles:
          card:
            - height: 38px
            - width: 105px
          entity_picture:
            - height: 17px
            - width: 86px
        tap_action:
          action: call-service
          service: script.turn_on
          service_data:
            entity_id: script.call_sonos_groundfloortab_launch
        type: 'custom:button-card'
      - color_type: blank-card
        type: 'custom:button-card'
      - icon: 'mdi:home'
        name: INSIDE
        styles:
          card:
            - font-size: 9px
        tap_action:
          action: call-service
          service: script.turn_on
          service_data:
            entity_id: script.sonos_play_whole_house
        type: 'custom:button-card'
      - icon: 'mdi:home-floor-g'
        name: DOWNSTAIRS
        styles:
          card:
            - font-size: 9px
        tap_action:
          action: call-service
          service: script.turn_on
          service_data:
            entity_id: script.sonos_downstairs_only
        type: 'custom:button-card'
      - icon: 'mdi:tree'
        name: GARDEN
        styles:
          card:
            - font-size: 9px
        tap_action:
          action: call-service
          service: script.turn_on
          service_data:
            entity_id: script.sonos_pause_whole_house
        type: 'custom:button-card'
    type: horizontal-stack
  - color_type: blank-card
    styles:
      card:
        - height: 10px
    type: 'custom:button-card'
  - artwork: full-cover
    entity: media_player.dining_room
    hide:
      controls: false
      icon: true
      info: false
      mute: true
      name: true
      power: true
      progress: true
      source: false
      volume: true
    info: scroll
    source: icon
    type: 'custom:mini-media-player'
    volume_stateless: true
  - artwork: none
    entity: media_player.dining_room
    hide:
      controls: true
      icon: true
      info: true
      mute: false
      name: true
      power: true
      progress: false
      source: true
      volume: false
    info: scroll
    max_volume: 50
    source: icon
    speaker_group:
      entities:
        - entity_id: media_player.dining_room
          name: Dining Room
        - entity_id: media_player.living_room
          name: Living Room
        - entity_id: media_player.kitchen
          name: Kitchen
        - entity_id: media_player.guest_room
          name: Guest Room
        - entity_id: media_player.library
          name: Library
        - entity_id: media_player.master_bedroom
          name: Master Bedroom
        - entity_id: media_player.study
          name: Study
        - entity_id: media_player.garden
          name: Garden
          volume_offset: 43
      expanded: false
      platform: sonos
      show_group_count: true
      sync_volume: true
    type: 'custom:mini-media-player'
    volume_stateless: false
style: |
  ha-card {
    background: none;
    box-shadow: none;
  --secondary-text-color: var(--primary-text-color);
  }
type: 'custom:vertical-stack-in-card'

@ronschaeffer

Hi Ron,

Sorry for my late reply, but off course, here do whatever you want with it, you can share, customize to your heart believes 😛

But first I’m not a developer and/or designer so if I look at your Github profile you probable understand these things better than I do 😉 I created a small manual to hopefully make things clear, I also give you a copy of my configuration file, but to be honest that’s quite a mess with all the things I’m trying out, playing with, so hopefully the short manual make things more clear 😉

Sonos.zip

Good luck and looking forward to what you can do with it

Kind regards, Danny

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix broken speaker group volume on Android 12
Android 12 introduced changes to group casting volume controls in response to a Sonos lawsuit. Here is how to work around some of...
Read more >
How to correct group playback delay - Google Nest Help
Stand between the out of sync speakers (or as close to in between as you can) and adjust their volume levels so you...
Read more >
Upcoming Speaker Group changes - Google Nest Community
To adjust volume on your speaker groups, you will need to adjust each speaker individually instead of using the group volume controller.
Read more >
Google Home app update makes Speaker Group volume ...
As stated by Google, Speaker Groups will continue functioning, barring these annoying changes.
Read more >
Google Cast Integration - Removing Speaker Group Volume ...
I have however been having issue with google groups on and off for months and yesterday found that google group calls did not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found