ColorPicker Card Lovelance

Hey guys,
i am trying to control my LED-Strip with HA.

On-Off works
Effects are working
Brightness is working

i also want to control the RGB value for the Strip.

So the question is, is there a ColorPicker for use in Lovelance?

Thanks

You mean like this one? It only appears when the light is switched on though.

Oh, didn’t know that one. Made it all on my own.

Thanks mate

I believe this is the link to the one above. I use it currently.

My screenshot is of a regular entity card, I believe if HA knows the capabilities of the entity, it will automatically show it. No need for custom cards :slight_smile:

Yours is a modal lightbox needing to be clicked to be adjusted though correct? The custom card allows you to see this in a card on your dashboard. I could be mistaken, but this works for me. If it ain’t broke, don’t fix it… :wink:

I use a slider-entity-row and the light-entity-card to create this page on my dashboard.

Realize this is an old thread, but as such, figured it worth an update as quite a few clicks on links have been made. I’ve updated my ‘adjustable’ lights tab / page on my dashboard. I define ‘adjustable light’ as one that’s more than on/off - either brightness and/or color and/or effect can be changed.

The biggest change is removing the light-entity-card (while still a great solution, I simply added too many to display all on one page). I’ve made the lights a little more ‘dynamic’, which allows for ease of turning them on/off - as well as adjusting where able.

Takes a couple of custom-cards (available via HACS) in order to implement. Links are to GitHub, they can be added by searching in HACS.

Essentially each light is a mushroom-template-card and a mushroom-light-card (for the slider and effect(s). One iteration for brightness and one for brightness + color.

  - title: Lighting
    icon: mdi:lightbulb-outline
    cards:
      - type: vertical-stack
        cards:
        - type: custom:decluttering-card
          template: de_mushroom_light_slider
          variables:
            - name: 'Kitchen Cans'
            - entity: light.cans_kitchen_zw
            - icon: mdi:light-recessed
        - type: custom:decluttering-card
          template: de_mushroom_light_slider
          variables:
            - name: 'Kitchen Chandelier'
            - entity: light.chandelier_kitchen_zw
            - icon: mdi:chandelier
        - type: custom:decluttering-card
          template: de_mushroom_light_slider
          variables:
            - name: 'Family Room Cans'
            - entity: light.cans_family_room_zw
            - icon: mdi:light-recessed
        - type: custom:decluttering-card
          template: de_mushroom_light_slider
          variables:
            - name: 'Family Room Chandelier'
            - entity: light.chandelier_family_room_zw
            - icon: mdi:chandelier
        - type: custom:decluttering-card
          template: de_mushroom_light_slider
          variables:
            - name: 'Movie Room Cans'
            - entity: light.cans_movie_room_zw
            - icon: mdi:light-recessed
        - type: custom:decluttering-card
          template: de_mushroom_light_slider
          variables:
            - name: 'Front Hall Lamp'
            - entity: light.bulb_front_hall_lamp_zb
            - icon: mdi:lamp-outline

 ## 2nd Column
      - type: vertical-stack
        cards:
        - type: custom:decluttering-card
          template: de_mushroom_light_slider
          variables:
            - name: 'Back Porch Cans'
            - entity: light.cans_outside_zw
            - icon: mdi:light-recessed
        - type: custom:decluttering-card
          template: de_mushroom_light_slider_color
          variables:
            - name: 'Kitchen Kauf RGB Big'
            - entity: light.kauf_rgb_sw_big_light
            - icon: mdi:light-switch
        - type: custom:decluttering-card
          template: de_mushroom_light_slider_color
          variables:
            - name: 'Kitchen Kauf RGB Small'
            - entity: light.kauf_rgb_sw_small_light
            - icon: mdi:light-switch

and decluttering cards:

  de_mushroom_light_slider_color:
    card:
      type: custom:stack-in-card
      mode: horizontal
      cards:
        - type: custom:mushroom-template-card
          card_mod:
            style: |
              ha-card {
                padding-top: 8px !important;
                padding-bottom: 8px !important;
              }
          primary: '[[name]]'
          secondary: >-
            {% if is_state('[[entity]]','on') %}
            {{ ((state_attr('[[entity]]','brightness')|int) / 255 * 100
            ) | int }}%
            {% endif %}
            {% if is_state('[[entity]]','on') and state_attr('[[entity]]','effect') != none %}
             [{{ state_attr('[[entity]]','effect') }}]
            {% endif %}
          icon: '[[icon]]'
          entity: '[[entity]]'
          tap_action:
            action: toggle
          hold_action:
            action: more-info
          double_tap_action:
            action: none
          icon_color: |-
            {% if is_state('[[entity]]','on') %}
              {{ '#%02x%02x%02x' % state_attr('[[entity]]','rgb_color') }}
            {% else %}
              #44739e
            {% endif %}
        - type: custom:mushroom-light-card
          card_mod:
            style: |
              ha-card {
                padding-top: 8px !important;
                padding-bottom: 8px !important;
              }
          entity: '[[entity]]'
          fill_container: false
          icon_type: none
          show_brightness_control: true
          name: ' '
          secondary_info: none
          primary_info: none
          show_color_control: true
          show_color_temp_control: true
          use_light_color: true
          collapsible_controls: true

  de_mushroom_light_slider:
    card:
      type: custom:stack-in-card
      mode: horizontal
      cards:
        - type: custom:mushroom-template-card
          primary: '[[name]]'
          secondary: >-
            {% if is_state('[[entity]]','on') %} {{
            ((state_attr('[[entity]]','brightness')|int) / 255 * 100 ) |
            int }}% {% endif %}
          icon: '[[icon]]'
          entity: '[[entity]]'
          tap_action:
            action: toggle
          hold_action:
            action: none
          double_tap_action:
            action: none
          icon_color: '{{ ''#FFC107'' if is_state(''[[entity]]'',''on'') else ''#44739e'' }}'
          card_mod:
            style: |
              ha-card { border: none !important;
                        padding-top: 9px !important;
                        padding-bottom: 9px !important;
                      }
        - type: custom:mushroom-light-card
          entity: '[[entity]]'
          fill_container: false
          icon_type: none
          show_brightness_control: true
          name: ' '
          primary_info: none
          show_color_control: false
          use_light_color: false
          show_color_temp_control: false
          collapsible_controls: true
          secondary_info: none
          card_mod:
            style: |
              ha-card { border: none !important;
                        padding-top: 9px !important;
                        padding-bottom: 9px !important;
                        --main-color: #FDC107;
                      }
              mushroom-light-brightness-control {
                --slider-color: #FDC107 !important;
              }
              mushroom-light-card { margin-top: -2px; margin-bottom: -2px; }

Long story short, allows me to click an icon if the entity is OFF and turn it on, and that then shows the slider bar (if only brightness available [like Kitchen Chandelier]) or the brightness bar AND the color selector (like the Kitchen KAUF RBG Big switch). If color is an option, it’ll also change the color of the icon / bar - otherwise defaults to #44739e. Lastly if there’s an effect active will show that effect in the brackets, immediately right of the brightness %

1 Like