kalkih / mini-media-player

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

Feature request: Add individual speaker volume sliders to group management #404

Open mountainsandcode opened 4 years ago

mountainsandcode commented 4 years ago

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:

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)

kalkih commented 3 years ago

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.

SdeGeata commented 3 years ago

@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:

`

ZNicoZ commented 1 year ago

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

SdeGeata commented 1 year ago

@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

ZNicoZ commented 1 year ago

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
SdeGeata commented 1 year ago

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.

ZNicoZ commented 1 year ago

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!

ggenot commented 6 months ago

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