mini-media-player icon indicating copy to clipboard operation
mini-media-player copied to clipboard

Feature request: Add individual speaker volume sliders to group management

Open mountainsandcode opened this issue 4 years ago • 8 comments

Thanks for your phenomenal work on this card, Karl!

I have a suggestion for an enhancement based on how I’m using the card currently:

  • I have one “main” card with the living room Sonos speaker, and the group feature (including volume sync) enabled.
  • For most of my usage, this is sufficient, but I sometimes find that I want to decouple the volume of one speaker, either to turn it up (e.g., in the kitchen) or down. Currently I’m using an additional entity stack with small cards for that

My suggestion is to add a config option to add individual volume sliders to be shown behind each of the speaker names in the group panel, which allows an individual volume control (Guess it only makes sense to show for those speakers that are grouped)

mountainsandcode avatar Aug 25 '20 06:08 mountainsandcode

Thanks, I've dismissed this request because since this would make the card dependant on multiple entities and their states.

I do however understand the practicality of this feature for multiroom arrangements and will therefore implement it in the future.

kalkih avatar Dec 26 '20 13:12 kalkih

@kalkih : Ditto on the phenomenal work! I am enjoying this a bunch!

@mountainsandcode : This is my work around to do exactly that. It is a vertical stack card with two players. The first card's volume controls the group and volumes accordingly. The second card has the individual speakers of which the volumes can be controlled independently - including the speaker that is the Master of the group even, as you may want to raise or lower only that one as well, without effecting the others.

Hope that helps until the next version.

`type: vertical-stack cards:

  • type: entities entities:
    • type: 'custom:mini-media-player' icon: 'mdi:speaker-wireless' entity: media_player.jam_wifi_main name: Jam Wi-Fi (Master) artwork: cover max_volume: 55 volume_step: 5 group: true hide: power: true icon: true source: true volume: false volume_level: false sound_mode: true controls: false play_pause: true play_stop: true next: true prev: true info: true speaker_group: platform: linkplay show_group_count: false sync_volume: true expanded: false icon: 'mdi:speaker-wireless' entities: - entity_id: media_player.library name: Library - entity_id: media_player.kitchen name: Kitchen volume_offset: 15 - entity_id: media_player.bathroom name: Bathroom - entity_id: media_player.bedroom_left name: Bedroom Left volume_offset: -15 - entity_id: media_player.bedroom_right name: Bedroom Right volume_offset: -15 toggle_power: false info: scroll
  • type: entities entities:
    • type: 'custom:mini-media-player' entity: media_player.jam_wifi_main name: Jam Main (Independant) group: true icon: 'mdi:speaker-wireless' max_volume: 55 hide: controls: true source: true power: true info: true volume_level: false icon: false
    • type: 'custom:mini-media-player' entity: media_player.library group: true icon: 'mdi:library-shelves' max_volume: 55 hide: controls: true source: true power: true info: true volume_level: false icon: false
    • type: 'custom:mini-media-player' entity: media_player.kitchen group: true icon: 'mdi:stove' max_volume: 70 hide: controls: true source: true power: true info: true volume_level: false
    • type: 'custom:mini-media-player' entity: media_player.bathroom group: true icon: 'mdi:paper-roll-outline' max_volume: 55 hide: controls: true play_pause: true play_stop: true prev: true next: true source: true power: true info: true volume_level: false
    • type: 'custom:mini-media-player' entity: media_player.bedroom_left max_volume: 55 group: true volume_stateless: false hide: power: true icon: false source: true volume: false volume_level: false sound_mode: true info: true controls: true play_pause: true play_stop: true prev: true next: true toggle_power: false icon: 'mdi:bed' info: scroll
    • type: 'custom:mini-media-player' entity: media_player.bedroom_right max_volume: 55 group: true volume_stateless: false hide: power: true icon: false source: true volume: false volume_level: false sound_mode: true info: true controls: true play_pause: true play_stop: true prev: true next: true toggle_power: false icon: 'mdi:bed' info: scroll

`

SdeGeata avatar Feb 12 '21 18:02 SdeGeata

seems like development of the pr is stuck for years now - are there any workarounds?

ZNicoZ avatar Feb 09 '23 20:02 ZNicoZ

@ZNicoZ: The post right above yours is a work-around. Been using that effectively for years now.

The too slider is the group, the lower ones are the individual speakers.

4331A163-6DF4-4FE1-A9FA-8A5E11FB0AD1

SdeGeata avatar Feb 09 '23 23:02 SdeGeata

Hm, I tried to use your config (was a bit difficult without proper formatting) - but I still have the same issue: Group volume only affects kitchen, not the main speaker (arc).

I have a Sonos system with an Arc combined with two Play:1 as Rear (they are somehow connected, I cannot use them seperatly) in the Living Room (Wohnzimmer) and another Sonos:One in the kitchen.

Here is how my config looks like:

type: vertical-stack
cards:
  - type: entities
    entities:
      - type: custom:mini-media-player
        icon: mdi:speaker-wireless
        entity: media_player.wohnzimmer
        name: Sonos Arc (Master)
        artwork: cover
        max_volume: 55
        volume_step: 5
        group: true
        hide:
          power: false
          icon: true
          source: true
          volume: false
          volume_level: false
          sound_mode: true
          controls: false
          play_pause: true
          play_stop: true
          next: true
          prev: true
          info: true
        speaker_group:
          platform: sonos
          show_group_count: true
          sync_volume: true
          expanded: false
          icon: mdi:speaker-wireless
          entities:
            - entity_id: media_player.kuche
              name: Kitchen
              volume_offset: 15
          toggle_power: false
          info: scroll
      - type: custom:mini-media-player
        entity: media_player.wohnzimmer
        name: Sonos Arc (Independant)
        group: true
        icon: mdi:speaker-wireless
        max_volume: 55
        hide:
          controls: true
          source: true
          power: true
          info: true
          volume_level: false
          icon: false
      - type: custom:mini-media-player
        entity: media_player.kuche
        group: true
        icon: mdi:speaker-wireless
        max_volume: 55
        hide:
          controls: true
          source: true
          power: true
          info: true
          volume_level: false
          icon: false

ZNicoZ avatar Feb 20 '23 13:02 ZNicoZ

Your group volume slider is the first slider, yes? The sliders found lower in the stack won’t effect each others volume. It is only the master speaker (in this case, your kitchen speaker) that should control your volume of the others in the group.

other than that, i can’t see why it wouldn’t work. Maybe a sonos thing? I doubt that though, i am told they are pretty good speakers.

SdeGeata avatar Feb 20 '23 16:02 SdeGeata

Maybe I´m just not understanding it ...

First entity: You first define your "master" speaker (in my case Wohnzimmer, Sonos Arc), then you define a group of speakers with volume-sync = true - those speakers don´t include the master speaker. (in my test case only Küche, Sonos One)

Second and following entities: In the next entities you define each player individually, including master speaker (named independent). (In my case Sonos Arc Wohnzimmer + Küche Sonos One)

Could you maybe post your yaml formatted correctly? You can do multi row code formatting with three ``` not one `

Thanks for your help!

ZNicoZ avatar Feb 21 '23 09:02 ZNicoZ

Maybe a bit lat but I was able to reproduce the work from @SdeGeata

type: vertical-stack
cards:
  - type: custom:mini-media-player
    entity: media_player.salon_2
    group: false
    artwork: material
    name: MusicCast Salon Group
    info: scroll
    speaker_group:
      expanded: true
      show_group_count: false
      sync_volume: true
      entities:
        - entity_id: media_player.salon_2
          name: Salon
        - entity_id: media_player.cuisine
          name: Cuisine
        - entity_id: media_player.bureau
          name: Bureau
        - entity_id: media_player.chambre
          name: Chambre
    replace_mute: play_pause
  - type: custom:mini-media-player
    entity: media_player.salon_2
    name: Salon
    group: true
    toggle_power: false
    hide:
      controls: true
      source: true
      info: true
      volume_level: false
      icon: true
      progress: true
      power_state: false
  - type: custom:mini-media-player
    entity: media_player.bureau
    name: Bureau
    group: true
    toggle_power: false
    hide:
      controls: true
      source: true
      info: true
      volume_level: false
      icon: true
      progress: true
      power_state: false
  - type: custom:mini-media-player
    entity: media_player.cuisine
    name: Cuisine
    group: true
    toggle_power: false
    hide:
      controls: true
      source: true
      info: true
      volume_level: false
      icon: true
      progress: true
      power_state: false
  - type: custom:mini-media-player
    entity: media_player.chambre
    name: Chambre
    group: true
    toggle_power: false
    hide:
      controls: true
      source: true
      info: true
      volume_level: false
      icon: true
      progress: true
      power_state: false

mediaplayer

I'm using Yamaha MusicCast so toggle_power: false is needed in my case, not sure for other technologies. The name of the room (in french) + number is comming from MusiCast too I think, I'm trying to get rid of it, I would also like to hide volume control if speaker is not linked but still working on it.

Cheers

ggenot avatar Mar 19 '24 13:03 ggenot