sbidy / wiz_light

A WiZ Light integration for Home Assistant
MIT License
341 stars 68 forks source link

Wiz Bulbs Stuck in Color Mode #172

Closed MFuell2 closed 2 years ago

MFuell2 commented 2 years ago

Loving this so far!! (using ~18 RGB + tunable white bulbs) Setting the bulb to say, green will change the bulb to green, and then using the white slider will change the bulb to a given white temp, but the icon stays green, and the color mode of the bulb stays hs instead of changing back to color_temp.

The bulb correctly updates to the new colors and to the temps, at least to my eye, and the Wiz app shows that it is a white temperature, however the color wheel/white slider menu does not behave as it should.

Steps to replicate:

  1. Start Home Assistant
  2. Change a bulb to a color (green in this case)
  3. Change the bulb to a white color using the temp slider
  4. Click off of the bulb card
  5. Click back to the bulb card, and the bulb card will take you straight to the color menu, and not the white menu (included images below showing the state of the bulbs)

Changing the bulbs to a white, and then restarting HASS fixes it temporarily until another color is used.

Thanks!!

Also mentioned here, but not directly acknowledged or properly explained: https://github.com/sbidy/wiz_light/issues/145#issuecomment-920214795 https://github.com/sbidy/wiz_light/issues/80#issuecomment-835880109

Starting point: bulb is starting in white mode image image image

Changing to Green: image image

Changing to Red: image image

Changing to white: image image

Clicking off the card, and back onto the card brings the color wheel up: image

sbidy commented 2 years ago

Let me check this. But I'm sure that the status will not be rested after changing from color to color temp.

ScottG489 commented 2 years ago

I have this issue as well I believe.

Comparing it to another bulb I have (TP-Link Kasa bulb), the behavior there is:

  1. Open the light dialog window
  2. Change the color
  3. Close then reopen the light dialog
  4. Observe the color picker being selected
  5. Change to the temperature picker
  6. Change the temperature
  7. Close then reopen the light dialog
  8. Observe the temperature picker being selected

In other words, between the color and temperature picker, the last one you interacted with will be what displays when you open the dialog back up. This aligns with what behavior I would expect as well.

However, with the Wiz bulb, I had touched the color picker at one point and now it doesn't matter what I interacted with last, it always shows the color picker when I open up the light dialog window.

Also if I do choose a color and then change the temperature, the color picker still shows the previous color as selected and the bulb icon is that color as well.

These issues also apply to light groups, including ones with non-Wiz bulbs.

@sbidy Also want to say thanks for your work on this project!

vdheijden commented 2 years ago

I'm having the same issue. I think it has to do with the "color_mode" state attribute. Notice in MFuell2's screenshots, the color mode starts as "color_temp" and changes to "hs" when the color is changed. This is correct so far. The problem is, when the light is changed back to white via the temperature slider, the color_mode stays as "hs." Instead, color_mode should change back to "color_temp." I believe this is what drives the UI behavior.

I've done the same test on my Kasa bulb for comparison, and the color_mode correctly changes back and forth whereas the wiz bulb gets stuck in "hs" and never changes back.

sbidy commented 2 years ago

Should be fixed in 0.4.5

vdheijden commented 2 years ago

Tested and looks like it's working now. Great work!

bdraco commented 2 years ago

This can be closed as its confirmed fixed in the core version