bokub / rgb-light-card

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

Range (min/max) of brightness #68

Closed chojnicki closed 1 year ago

chojnicki commented 1 year ago

Hi. Bulbs in my dimmers are starting to light up from value 65/255 and not 1. Also 170/255 is already on full brightness. So real dimming range is between 65 and 170. This is the case with most dimmable LED bulbs on market and dimmers. My dimmers doesn't have option to set minimum brightness, so instead I forced it via flow in NodeRED. It's very simple: when dimmer sets brightness (via button on wall) below 65, it changes it to 65, and when it's above 170, it changes it to 255 to avoid any flickering and unnecessary stress on bulb electronic. It works great.

But this of course causes problems in dashboard with HA light card and this one as well. When I'm changing brightness to 10% via dashboard, I'm expecting to have dimmed light, but instead this gauge jumps to around 40% (thanks to my NodeRED script).

Is there any way to set manually range of this light card? So not 0-255 but any values I want?

bokub commented 1 year ago

Hi @chojnicki,

I don't understand your problem, the brightness values associated to each button are supposed to be configured by you, my card doesn't choose the brightness values :shrug:

For example, you could configure your card like this so it has 3 brightness levels, all of them being within your range:

    - type: 'custom:rgb-light-card'
      entity: light.example_light
      colors:
          - brightness: 70
          - brightness: 120
          - brightness: 170
chojnicki commented 1 year ago

I'm talking about brightness slider (custom range for it), not buttons.

Edit: It is possible that I created issue in wrong repository somehow, because on main Readme I do not see sliders, just color buttons ;)

bokub commented 1 year ago

Yes, you posted in the wrong repository, my card doesn't have a slider...