bokub / rgb-light-card

💡 A Lovelace custom card for RGB lights
MIT License
412 stars 24 forks source link

Support for simple brightness #53

Closed XRyu closed 2 years ago

XRyu commented 2 years ago

I would love to also use these for tunable whites. Can you support this?

I would love to see the setting for warm/cold white and different color for setting bright so this would look way better:

entities:
  - type: custom:rgb-light-card
    entity: light.light_gruppe_wohnzimmer
    justify: around
    colors:
      - brightness_pct: 0
        label: Aus
      - brightness_pct: 10
        label: 10%
      - brightness_pct: 30
        label: 30%
      - brightness_pct: 50
        label: 50%
      - brightness_pct: 70
        label: 70%
      - brightness_pct: 100
        label: 100%
show_state: true
icon_height: 50px
bokub commented 2 years ago

Looks like a duplicate of #25

In a nutshell: Everything supported by the light.turn_on service of Home Assistant is supported by this card, you just have to find the right parameters.

bokub commented 2 years ago

I think you commented in the wrong issue (#25 instead of this one) 😬

You're totally right, icon coloring for white lights is not supported yet.

I may add this feature when I have time, but if someone wants to work on it that would be great too!

XRyu commented 2 years ago

Haha, damn you are right. I will delete it there and copy it here! :)

Not a duplicate :) Its totally supported and works - its just some asthetics - when you just use the code as i posted above, there are just grey cells. There could be an other default cell color, i think this might already help and when only brightness is specified the color might be faded through the alphachannel in rgba CSS :) I have done this, and like it now:

type: entities
entities:
  - type: custom:rgb-light-card
    entity: light.light_gruppe_wohnzimmer
    justify: around
    colors:
      - brightness_pct: 0
        label: Aus
      - brightness_pct: 10
        label: 10%
        icon_color: rgba(255, 215, 0, 0.1)
      - brightness_pct: 30
        label: 30%
        icon_color: rgba(255, 215, 0, 0.3)
      - brightness_pct: 50
        label: 50%
        icon_color: rgba(255, 215, 0, 0.5)
      - brightness_pct: 70
        label: 70%
        icon_color: rgba(255, 215, 0, 0.7)
      - brightness_pct: 100
        icon_color: rgba(255, 215, 0, 1)
        label: 100%
show_state: true
icon_height: 50px

Looks like this: image

Vs formerly this: image

BTW: I really love this Card, its ultra versatile and looks beautifull, a little like most Apple Interfaces - simple, versatile and beautiful. I like it much better than the "XXX Button Row" cards, which are many nowadays. :D

bokub commented 2 years ago

:heavy_check_mark: Fixed in version 1.11.0 !