custom-cards / stack-in-card

🛠 group multiple cards into one card without the borders
MIT License
262 stars 24 forks source link

No card background color when using Stack-in-card in combination with Custom button card #11

Closed sheminasalam closed 3 years ago

sheminasalam commented 4 years ago

I have tried using stack in car with custom button card, both your products which I really appreciate. But when I use them together I find that the background color set with the custom button card is not loading. In fact when we are editing the lovelace config, the background color flashes once and them goes away. I have used this particular setup to add preset controls along with my camera feed. Also note that I was using the vertical-stack-in card earlier which is also a good product of yours. When that was used I had no issue with the background color. Please check the config below.

cards:
  - cards:
      - aspect_ratio: 50%
        camera_view: live
        entity: camera.gate_ptz_cam
        image: 'https://demo.home-assistant.io/stub_config/bedroom.png'
        show_name: false
        show_state: false
        type: picture-entity
      - cards:
          - color: 'rgb(66, 134, 244)'
            color_type: card
            entity: script.1593105866855
            icon: 'mdi:numeric-1-box-outline'
            show_name: false
            size: 50%
            styles:
              card:
                - height: 40px
                - border-radius: 5%
                - background-color: 'rgb(40, 109, 214)'
            tap_action:
              action: call-service
              service: script.turn_on
              service_data:
                entity_id: script.1593105828509
            type: 'custom:button-card'
          - color: 'rgb(66, 134, 244)'
            color_type: card
            entity: script.1593105866855
            icon: 'mdi:numeric-2-box-outline'
            show_label: true
            show_name: false
            size: 50%
            styles:
              card:
                - height: 40px
                - border-radius: 5%
                - background-color: '#000044'
            tap_action:
              action: call-service
              service: script.turn_on
              service_data:
                entity_id: script.1593105866855
            type: 'custom:button-card'
          - color: 'rgb(66, 134, 244)'
            color_type: card
            entity: script.1593105866855
            icon: 'mdi:numeric-3-box-outline'
            show_name: false
            size: 50%
            styles:
              card:
                - height: 40px
                - border-radius: 5%
                - background-color: 'rgb(44, 109, 214)'
            tap_action:
              action: call-service
              service: script.turn_on
              service_data:
                entity_id: script.1593105901099
            type: 'custom:button-card'
        type: horizontal-stack
    type: vertical-stack
mode: vertical
type: 'custom:stack-in-card'