Skip to content
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

Correct color to color_rgb in CL-L02D.md #3552

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

adstheorganic
Copy link

No description provided.

Updated docs to specify color_rgb instead of color in the examples where it was incorrect
fix copy paste mistake
@Koenkk
Copy link
Owner

Koenkk commented Mar 1, 2025

I dont believe this is correct, what doesnt work when using color?

@adstheorganic
Copy link
Author

adstheorganic commented Mar 1, 2025

As you can see, some of the existing documentation was already a mix match of color_rgb and color

"with payload {"color_rgb": {"hue": HUE, "saturation": SATURATION}} (e.g. {"color":{"hue":360,"saturation":100}})."

I just replaced the ones that weren't, but as an example I can run
image
and it works but if I run
image
nothing happens

@adstheorganic
Copy link
Author

adstheorganic commented Mar 1, 2025

However, I will admit I may have been a bit overzealous in the changes, it was gone 2 am when I made them, let me got and test all the different scenarios and undo any that are wrong

@adstheorganic
Copy link
Author

adstheorganic commented Mar 1, 2025

image I cannot get {"hue": HUE, "saturation": SATURATION} to work for color, color_rgb or color_hs, and color_hs does not seem to work at all

{"color": {"h": H, "s": S, "b": B}} works for the white light and {"color_rgb": {"h": H, "s": S, "b": B}} works for the rgb light, but this is currently only mentioned under the rgb light endpoint section, same is true of {"hsb": "H,S,B"}, {"h": H, "s": S, "v": V}, {"hsv": "H,S,V"},{"h": H, "s": S, "l": L}, and {"hsl": "H,S,L"}

Also the section underneath mentions Transition being able to be applied, to any of the above, but so far I'm yet to find a single transition where it has worked, trying to change the color/brightness or color temp with a transition just seems to apply it immediately anyway

@adstheorganic
Copy link
Author

adstheorganic commented Mar 1, 2025

Ahh okay, I understand now, the documentation being inconsistent was confusing, the section names are expecting to be suffixed with _rgb or _white based on the type of light, but that's not specified in the examples which you'd think you can just copy and paste to test, so brightness_rgb or bright_white, is just being called brightness.

Still the color_hs_white and color_hs_rgb don't work, and so far the only one I've found to work with the transition was color_temp_rgb, not even color_temp_white, and none of the other rgb ones

some of the other suck as {"color_rgb":{"hsv":"100,100,100"},"transition":5} happen immediately on the light, but then it just waits for the transition time to actually update home assistant, rather than the real light transitioning,

@adstheorganic
Copy link
Author

adstheorganic commented Mar 1, 2025

Other weird oddities, the color temp presets on the white light coolest, cool, neutral, warmest actually represent the values of 153, 250, 370, 370 respectively (in home assistant there are 4 default options that I would assume to be the same but they are 153, 190, 251, and 370)

brightness_move/step color_temp_move/step apply to the white light when not specified (brightness_move_white, color_temp_step_rgb to specifiy for example). Regardless of whether white is specified or not move just immediately jumps to 100% or 0 (depending on + or - value) but step works correctly. For saturation and hue, move does not seem to recognised at all, (message received but not error) and step is received and returns the value, but the value doesn't change.

I know most of these are probably on aqara, but I'm just mentioning them here so if someone take a look at why the docs are the way they are, they have this as a reference point, and this helps me keep a log which I can report to aqara directly

Change to match what I'm actually seeing and list out values and some bugs (which can be removed as they're fixed (hopefully)
Add back in transition for the one use case, and add the values for `coolest`, `cool`, `neutral`, `warmest` to the rgb section as they're the same
@adstheorganic
Copy link
Author

If you'd rather we leave the transition section as I'm sure I've not tested everything, then feel free to add it back in, but I tested a lot and that was the only one I found

"hue_step": -90, // Decrease hue by 90 (allowed value range: -255 till 255)
"saturation_move": -55, // Starts moving saturation down at -55 units per second (allowed value range: -255 till 255)
"saturation_step": 66, // Increase saturation by 66 (allowed value range: -255 till 255)
"brightness_move_rgb": -40, // Starts moving brightness down at 40 units per second
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants