home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.1k stars 2.8k forks source link

No way to select white LEDs in RGBW light #15756

Closed Elkropac closed 1 year ago

Elkropac commented 1 year ago

Checklist

Describe the issue you are experiencing

When i want to go from color light back to white light on my RGBW bulb i click into central white dot but i get RGB white, not white from dedicated LEDs.

In esphome log, i can see this after click white center

[22:45:50][D][light:035]: 'zemismart_bulb_a19_002_light_rgbw' Setting:
[22:45:50][D][light:054]:   Color brightness: 100%
[22:45:50][D][light:057]:   Red: 100%, Green: 100%, Blue: 100%

Describe the behavior you expected

Clicking white center switches from color_mode = rgb to color_mode = white. Or have some other way like in old frontend

Steps to reproduce the issue

  1. click some color on color wheel
  2. click white center on color wheel

What version of Home Assistant Core has the issue?

2023.3.1

What was the last working version of Home Assistant Core?

2023.2.?

In which browser are you experiencing the issue with?

Chromium Version 110.0.5481.177

Which operating system are you using to run this browser?

Debian unstable

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

piitaya commented 1 year ago

Hello 🙂 Can you provide the state and the attributes of your light? https://my.home-assistant.io/redirect/developer_states/ It seems that your light is using rgb + white color modes and not rgbw color mode right?

Elkropac commented 1 year ago

Hi, it is set in esphome as rgbw light like this

light:
  - platform: rgbw
    id: light_01
    name: "${dev_name}_light_rgbw"
    default_transition_length: 0s
    color_interlock: true
    red: output_red
    green: output_green
    blue: output_blue
    white: output_white
    effects: !include ../../.common/light_effects_01.yaml

my9231:
  data_pin: GPIO13
  clock_pin: GPIO15
  num_channels: 4
  num_chips: 1
#  bit_depth: 14

output:
  - platform: my9231
    id: output_blue
    channel: 1
  - platform: my9231
    id: output_red
    channel: 3
  - platform: my9231
    id: output_green
    channel: 2
  - platform: my9231
    id: output_white
    channel: 0

I have button to turn the light on in white mode, then the state is

supported_color_modes:
  - rgb
  - white
color_mode: white
brightness: 242
friendly_name: Lampa u postele
supported_features: 40

after selecting some color from wheel

supported_color_modes:
  - rgb
  - white
color_mode: rgb
brightness: 242
friendly_name: Lampa u postele
supported_features: 40
hs_color:
  - 0
  - 100
rgb_color:
  - 255
  - 0
  - 0
xy_color:
  - 0.701
  - 0.299

after clicking to central white dot

supported_color_modes:
  - rgb
  - white
color_mode: rgb
brightness: 242
friendly_name: Lampa u postele
supported_features: 40
hs_color:
  - 0
  - 0
rgb_color:
  - 255
  - 255
  - 255
xy_color:
  - 0.323
  - 0.329
Elkropac commented 1 year ago

It seems that your light is using rgb + white color modes and not rgbw color mode right?

What should I check? I don't know ;) I was using separate RGB and W lights/entities (each bulb have had two lights on them) for several years, then i started using RGBW few months ago

piitaya commented 1 year ago

As a quick fix I think you can turn off color_interlock for your rgb light so I will turn you light into a rgbw light instead of rgb + white (https://esphome.io/components/light/rgbw.html#color-interlock). But I think you enabled it for a reason so I'm not sure it's a solution for this. Meanwhile, I will see how it is possible to support the white color mode.

Elkropac commented 1 year ago

Ok, i will try. I think color_interlock was reason why I moved from separate lights to one merged, I did not like how it behaved before it was implemented. I will try how it works without it

Elkropac commented 1 year ago

Hi, yeah, without color_interlock i can change brightness of white., but the two brightness controls just don't feel right

Elkropac commented 1 year ago

Could it be possible to add icon to change color_mode like this?

image

Even on RGBCW lights, to change color mode, i have to go to color wheel and select some color or different temperature of white to change mode. This icon could change color mode without needing to change anything else

piitaya commented 1 year ago

Spoiler alert : https://github.com/home-assistant/frontend/pull/15774

For the change mode button, it's not possible to change the mode without sending rgb value or color temperature, that's why we don't have a way to change mode easily. In the future, we want to add some color presets (white mode could be one of those) to easily switch between preferred colors/color modes.

Above, you can see a quick mockup (design is not definitive, it's just to give an idea)

CleanShot 2023-03-09 at 11 50 19@2x
Elkropac commented 1 year ago

Great thanks. It would be great to be able to change color mode in future.

Most of my lights are RGBWW anyway, just few remain RGBW (and they seemed to start to malfunction anyway https://github.com/esphome/issues/issues/4282).

Is pull request #15774 going to land in 2023.03 ?

piitaya commented 1 year ago

Not sure because it requires backend core. It should be in 2023.4.

Elkropac commented 1 year ago

Ah ok, i thought this was some simple workaround for now. Not a problem, thanks :)