Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
1.87k stars 52 forks source link

Horizontal Stack Sub Button Bubble Card Doesn't Show Light Color #633

Open tdvantine opened 3 months ago

tdvantine commented 3 months ago

Describe the bug
Horizontal Stack Bubble Card Doesn't Show Light Color

To Reproduce
Steps to reproduce the behavior:

  1. Create Horizontal Stack card using bubble card
  2. Add a sub button with light entity
  3. Toggle the entity on and the background changes to active, but not the color of the light

Expected behavior
Upon toggling the light the background should change to the color of the light entity

Screenshots
Off state:

image

On state:

image

YAML

type: horizontal-stack
cards:
  - type: custom:bubble-card
    entity: light.ny1_p_wled_01
    button_type: switch
    show_icon: true
    force_icon: true
    show_name: true
    show_last_changed: false
    show_state: false
    show_last_updated: true
    show_attribute: true
    attribute: brightness
    scrolling_effect: true
    card_layout: normal
    button_action:
      tap_action:
        service: scene.turn_on
        target:
          entity_id: scene.window_bw
        action: toggle
    tap_action:
      service: scene.turn_on
      target:
        entity_id: scene.window_bw
      action: toggle
    sub_button:
      - icon: ''
        show_state: false
        show_attribute: false
        show_icon: false
        show_background: true
        show_name: true
        tap_action:
          action: call-service
          service: light.toggle
          target:
            entity_id: light.ny1_p_wled_01
        name: Window
        show_last_changed: false
        hold_action:
          action: more-info
        double_tap_action:
          action: navigate
          navigation_path: '#windowlx'
        attribute: brightness
      - name: 'Bed '
        show_name: true
        show_icon: false
        show_background: true
        tap_action:
          action: call-service
          service: light.toggle
          target:
            entity_id: light.rgbw2_01
        entity: light.rgbw2_01
        hold_action:
          action: more-info
        double_tap_action:
          action: navigate
          navigation_path: '#bedlx'
      - name: Overhead
        show_name: true
        show_icon: false
        show_background: true
        tap_action:
          action: call-service
          service: light.toggle
          target:
            entity_id: scene.window_dw
        hold_action:
          action: more-info
        double_tap_action:
          action: navigate
          navigation_path: '#overheadlx'
    card_type: separator
    name: LX Control
    icon: mdi:lightbulb-group-outline
    hold_action:
      action: more-info
    double_tap_action:
      action: more-info
    styles: |
      .bubble-button-card-container {
        background: #4e4b4b10 !important;
        }
      # .bubble-sub-button-1 {
      #   background-color: rgba(30,30,30,1) !important;
      #   }
      # .bubble-sub-button-2 {
      #   background-color: rgba(30,30,30,1) !important;
      #   }
      .bubble-sub-button-3 {
        background-color: rgba(30,30,30,1) !important;
        }
      .bubble-icon {
        color: white !important;
        }
      .bubble-icon-container {
        background: rgba(50, 50, 50, 0.5);
        }
      .bubble-line {
        background: #4e4b4b10;
        opacity: 0.1;
        }

Informations (please complete the following information):

Clooos commented 3 months ago

Hi, indeed I haven't added that yet so this is expected.

But I will add this possibility soon 👌