-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
PilotBuilder's _set_rgb overrides the 'c' and 'w' values I pass into the PilotBuilder's constructor. #96
Comments
This should set the correct hue/saturation of the color based on the Wiz App color representation. |
There is now functionality to set RGBWW/RGBW. Please use those in the future. |
This should be closable since there is an alternative option that will work |
TLDR: This behavior is by design. I agree that it is confusing that trying to set an RGB color on the bulb engages the cw component. It took me a bit to wrap my head around it, but it's easiest to understand if you look at the wiz app and the color picker. You expect the bulb to be bright white when the picker is centered, which is (rgb = 0, 0, 0). So... this isn't a classic downward projection of a cube in HSV with black at (rgb = 0, 0, 0). If you look at my comments in the rgb2rgbcw code, I documented why this happens both from a functional standpoint and from a hardware standpoint.
|
I'm creating a PilotBuilder with the RGB values (255, 173, 0), 0 cold white, and 0 warm white. Then I'm passing the PilotBuilder instance into the turn_on method of the light.
It turns out the PilotBuilder constructor passes my RGB value to _set_rgb, which in turn calls rgb2rgbcw and uses the returned values to set cold white and warm white to non-zero values.
This appears to be very much intentional and so I'm assuming this isn't a bug and you're covering a use case I'm unaware of. Perhaps I'm using the PilotBuilder incorrectly to set the RGB values of my bulb. However, it seemingly would be very nice for the PilotBuilder to maintain the values I passed into the constructor.
This isn't a huge deal because I can work around this by doing this after I create the PilotBuilder:
pilot_builder.pilot_params["w"] = 0
pilot_builder.pilot_params["c"] = 0
The text was updated successfully, but these errors were encountered: