ofekashery / vertical-stack-in-card

📐 Home Assistant Card: Group multiple cards into a single sleek card.
MIT License
875 stars 77 forks source link

Shadow card appearance #154

Open lightsabata opened 1 year ago

lightsabata commented 1 year ago

hi, i try to create a custom card for my tv, it work great unfortunately the shadow of each card still present shadow

i use the official conditionnal card and the mushroom entity card and swipe card from HACS on HASSIO 2023.08.1

i saw the problem on issues threads and a fix in 0.12 but it seems to be from another breaks.

has anyone have encounter this behavour ?

here's my code:

cards:
  - type: custom:vertical-stack-in-card
    cards:
      - type: custom:mushroom-media-player-card
        entity: media_player.tv
        use_media_info: true
        show_volume_level: false
        media_controls:
          - on_off
          - previous
          - next
          - play_pause_stop
        volume_controls:
          - volume_set
        collapsible_controls: false
      - type: conditional
        conditions:
          - entity: sensor.interface_tv_source_live_tv
            state: 'on'
        card:
          type: horizontal-stack
          cards:
            - type: custom:mushroom-template-card
              primary: ''
              secondary: ''
              icon: mdi:minus
              tap_action:
                action: call-service
                service: webostv.button
                target: {}
                data:
                  entity_id: media_player.tv
                  button: CHANNELDOWN
              layout: vertical
              icon_color: blank
            - type: custom:mushroom-template-card
              primary: ''
              secondary: ''
              icon: mdi:information
              tap_action:
                action: call-service
                service: webostv.button
                target: {}
                data:
                  entity_id: media_player.tv
                  button: INFO
              layout: vertical
              icon_color: blank
            - type: custom:mushroom-template-card
              primary: ''
              secondary: ''
              icon: mdi:plus
              tap_action:
                action: call-service
                service: webostv.button
                target: {}
                data:
                  entity_id: media_player.tv
                  button: CHANNELUP
              layout: vertical
              icon_color: blank
      - type: conditional
        conditions:
          - entity: sensor.interface_tv_source_hdmi
            state: 'off'
        card:
          type: custom:tv-card
          entity: media_player.tv
          navigation_row: touchpad
      - type: conditional
        conditions:
          - entity: sensor.interface_tv_source_hdmi
            state: 'off'
        card:
          type: horizontal-stack
          cards:
            - type: custom:mushroom-template-card
              primary: ''
              secondary: ''
              icon: mdi:arrow-u-left-top-bold
              tap_action:
                action: call-service
                service: webostv.button
                target: {}
                data:
                  entity_id: media_player.tv
                  button: BACK
              layout: vertical
              icon_color: blank
            - type: custom:mushroom-template-card
              primary: ''
              secondary: ''
              icon: mdi:home
              tap_action:
                action: call-service
                service: webostv.button
                target: {}
                data:
                  entity_id: media_player.tv
                  button: HOME
              layout: vertical
              icon_color: blank
      - type: conditional
        conditions:
          - entity: media_player.tv
            state: 'on'
        card:
          type: horizontal-stack
          cards:
            - type: custom:mushroom-entity-card
              entity: sensor.interface_tv_source_hdmi
              icon_color: white
              primary_info: none
              secondary_info: none
              tap_action:
                action: call-service
                service: media_player.select_source
                target:
                  entity_id: media_player.tv
                data:
                  source: TrueNAS SCALE
              layout: horizontal
            - type: custom:mushroom-entity-card
              entity: sensor.interface_tv_source_jellyfin
              icon_color: white
              primary_info: none
              secondary_info: none
              tap_action:
                action: call-service
                service: media_player.select_source
                target:
                  entity_id: media_player.tv
                data:
                  source: Jellyfin
              layout: horizontal
            - type: custom:mushroom-entity-card
              entity: sensor.interface_tv_source_netflix
              icon_color: white
              primary_info: none
              secondary_info: none
              tap_action:
                action: call-service
                service: media_player.select_source
                target:
                  entity_id: media_player.tv
                data:
                  source: Netflix
              layout: horizontal
            - type: custom:mushroom-entity-card
              entity: sensor.interface_tv_source_prime_video
              icon_color: white
              primary_info: none
              secondary_info: none
              tap_action:
                action: call-service
                service: media_player.select_source
                target:
                  entity_id: media_player.tv
                data:
                  source: Prime Video
            - type: custom:mushroom-entity-card
              entity: sensor.interface_tv_source_live_tv
              icon_color: white
              primary_info: none
              secondary_info: none
              tap_action:
                action: call-service
                service: media_player.select_source
                target:
                  entity_id: media_player.tv
                data:
                  source: Live TV
              layout: horizontal
  - type: vertical-stack
    cards:
      - type: conditional
        conditions:
          - entity: sensor.interface_salon_source_cherie_fm
            state: 'on'
        card:
          type: custom:vertical-stack-in-card
          cards:
            - type: custom:mushroom-media-player-card
              entity: media_player.owntone_server
              show_volume_level: false
              volume_controls:
                - volume_set
              media_controls:
                - play_pause_stop
              collapsible_controls: false
              name: Radio
              icon: mdi:radio
            - type: horizontal-stack
              cards:
                - type: custom:mushroom-entity-card
                  entity: sensor.interface_salon_source_cherie_fm
                  name: Chérie FM
                  icon_color: pink
                  tap_action:
                    action: call-service
                    service: automation.trigger
                    target:
                      entity_id: automation.interface_radio_cherie_fm
                    data:
                      skip_condition: true
                  layout: vertical
                  primary_info: name
                  secondary_info: none
                - type: custom:mushroom-entity-card
                  entity: sensor.interface_salon_source_spotify
                  layout: vertical
                  icon_color: green
                  tap_action:
                    action: call-service
                    service: automation.trigger
                    target:
                      entity_id: automation.auto_lecture_spotify
                    data:
                      skip_condition: true
                  primary_info: name
                  secondary_info: none
                  name: Spotify
                - type: custom:mushroom-entity-card
                  entity: sensor.interface_salon_source_owntone
                  name: AirPlay
                  icon_color: blue
                  tap_action:
                    action: call-service
                    service: automation.trigger
                    target:
                      entity_id: automation.voix_lecture_musique
                    data:
                      skip_condition: true
                  hold_action:
                    action: call-service
                    service: media_player.turn_on
                    target:
                      entity_id: media_player.owntone_output_rhasspy
                  layout: vertical
                  primary_info: name
                  secondary_info: none
      - type: conditional
        conditions:
          - entity: sensor.interface_salon_source_spotify
            state: 'on'
        card:
          type: custom:vertical-stack-in-card
          cards:
            - type: custom:mushroom-media-player-card
              entity: media_player.spotify_charlotte_blackburn
              use_media_info: true
              volume_controls:
                - volume_set
                - volume_mute
              media_controls:
                - previous
                - play_pause_stop
                - next
            - type: horizontal-stack
              cards:
                - type: custom:mushroom-entity-card
                  entity: sensor.interface_salon_source_cherie_fm
                  name: Chérie FM
                  icon_color: pink
                  tap_action:
                    action: call-service
                    service: automation.trigger
                    target:
                      entity_id: automation.interface_radio_cherie_fm
                    data:
                      skip_condition: true
                  layout: vertical
                  primary_info: name
                  secondary_info: none
                - type: custom:mushroom-entity-card
                  entity: sensor.interface_salon_source_spotify
                  layout: vertical
                  icon_color: green
                  tap_action:
                    action: call-service
                    service: automation.trigger
                    target:
                      entity_id: automation.auto_lecture_spotify
                    data:
                      skip_condition: true
                  primary_info: name
                  secondary_info: none
                  name: Spotify
                - type: custom:mushroom-entity-card
                  entity: sensor.interface_salon_source_owntone
                  name: AirPlay
                  icon_color: blue
                  tap_action:
                    action: call-service
                    service: automation.trigger
                    target:
                      entity_id: automation.voix_lecture_musique
                    data:
                      skip_condition: true
                  hold_action:
                    action: call-service
                    service: media_player.turn_on
                    target:
                      entity_id: media_player.owntone_output_rhasspy
                  layout: vertical
                  primary_info: name
                  secondary_info: none
      - type: conditional
        conditions:
          - entity: sensor.interface_salon_source_owntone
            state: 'on'
        card:
          type: custom:vertical-stack-in-card
          cards:
            - type: custom:mushroom-media-player-card
              entity: media_player.owntone_server
              show_volume_level: false
              volume_controls:
                - volume_set
              media_controls:
                - play_pause_stop
                - previous
                - next
              collapsible_controls: false
              icon: mdi:speaker
              use_media_info: true
            - type: horizontal-stack
              cards:
                - type: custom:mushroom-entity-card
                  entity: sensor.interface_salon_source_cherie_fm
                  name: Chérie FM
                  icon_color: pink
                  tap_action:
                    action: call-service
                    service: automation.trigger
                    target:
                      entity_id: automation.interface_radio_cherie_fm
                    data:
                      skip_condition: true
                  layout: vertical
                  primary_info: name
                  secondary_info: none
                - type: custom:mushroom-entity-card
                  entity: sensor.interface_salon_source_spotify
                  layout: vertical
                  icon_color: green
                  tap_action:
                    action: call-service
                    service: automation.trigger
                    target:
                      entity_id: automation.auto_lecture_spotify
                    data:
                      skip_condition: true
                  primary_info: name
                  secondary_info: none
                  name: Spotify
                - type: custom:mushroom-entity-card
                  entity: sensor.interface_salon_source_owntone
                  name: AirPlay
                  icon_color: blue
                  tap_action:
                    action: call-service
                    service: automation.trigger
                    target:
                      entity_id: automation.voix_lecture_musique
                    data:
                      skip_condition: true
                  hold_action:
                    action: call-service
                    service: media_player.turn_on
                    target:
                      entity_id: media_player.owntone_output_rhasspy
                  layout: vertical
                  primary_info: name
                  secondary_info: none
  - type: custom:mushroom-media-player-card
    entity: media_player.windows
    use_media_info: true
    show_volume_level: false
    media_controls:
      - play_pause_stop
    volume_controls:
      - volume_set
    collapsible_controls: false
    icon: mdi:microsoft
    primary_info: name
    name: Windows
Silther commented 12 months ago

has anyone have encounter this behavour ?

here's my code:

  - type: horizontal-stack
      cards:
        - type: 

This is normal, because you used the stock horizontal-stack card and not a horizontal-stack-in-card.

Currently I don't know of any working and still supported alternatives.

PS If you send such a long code please use the collapse option in github to make it more compact.