DBuit/light-popup-card

Light's that support colours will display as a switch and not a slider

AAllport opened this issue · 2 comments

Due to the line here:

${(stateObj.attributes.supported_color_modes?.includes(
"brightness"
) &&

When a light supports RGB or XY, it renders us a switch, and not a slider.
Whilst this is overridable, it would be great for it to be automatically picked up.

I'm not sure whether it would be best to list all of the supported light modes that are likely to have brightness or add a check for attrs.brightness
Unfortunately, it looks like entities lose their brightness attr when turned off.

@AAllport How to fix it ? I have this problem. I only have a switch and not the slider.
brgds

It's possible to pass a displayType of slider which will have the same effect