-
Notifications
You must be signed in to change notification settings - Fork 583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix white only scene on RGBW lights #129
Conversation
Hi @ultratoto14 , |
Hi @SmartM-ui, i mean scene editor
Without this patch, we can have different behaviour. Thanks for testing. |
Hi @ultratoto14 ,
The light bulb returned to white, but the slider remained at the "cold" color temperature and did not return to the center of the slider as it was previously saved in the scene. This is scenes.yaml: I tried the same situation with the localtuya version prior to your work and the scenes do not bring the light bulb back to white, but change to the light "violet" color. PS thanks to you for developing this component! |
Hi @SmartM-ui, thanks again for testing, seems that the problem comes from the changed i made to put back the color picker to white (if you remember). I mean, when we change to color, the color_temp slider stay where it is, only the bulb icon color is changed. It seems not so bad, what do you think ? |
Hi @ultratoto14 , Unfortunately I only have TUYA bulbs, I can't try scenes with other bulbs. However, this new version is better than the previous one. This change of yours made me think of a request to make ... I open a new issue. Thanks again |
Hi @postlund , @rospogrigio, @SmartM-ui need your advice on this one. Setting to [0,0] generates an unwanted behavior, when using white only scene, the HA scene editor is storing the bulb state and stores the color_temp and this [ 0, 0 ] color. When applying the state as there is some color, HA does not send the color_temp to the light in the turn_on call. So the normal scene behavior and internal way of managing color and color_temp is that when in white, color is None. I do not know if when in color, color_temp should be None too. Should we remove this forcing and go back to a color picker temporary keeping the previous color as the bulb icon reflects the real setting ? |
@SmartM-ui, @postlund , @rospogrigio just found that : home-assistant/frontend#6091 Seems that only relevant data should be returned, so in case Color, color_temp should be none and so one. |
b6cd176
to
801bf13
Compare
801bf13
to
d84062e
Compare
@rospogrigio or @postlund. This is ready for review. |
Hi, |
Hi @SmartM-ui
Thanks for testing. |
Hi @ultratoto14 , When you edit the scene previously set to color and move the color_temp, the position of the indicator remains on the previously chosen color (red), but when you execute the scene the color is set to white also respecting the set color temperature. The yaml file of the white is as follows:
|
Hi @postlund, @SmartM-ui confirmed the behavior. It could merged. |
When a scene is created using the HA scene editor, it stores the complete status of the light.
When the scene is applied, HA scene this complete status.
In my previous PR, I forced the color to hs [0, 0] to be sure that the color picker return to white when we use color_temp
With that, the scene editor will now store this white value. If we detect this value, we force ignore the color and only set the white related settings.