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

Mijia Lamp group has bug #1403

Open
GavinIves opened this issue Jul 17, 2024 · 3 comments
Open

Mijia Lamp group has bug #1403

GavinIves opened this issue Jul 17, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@GavinIves
Copy link

GavinIves commented Jul 17, 2024

Using Mi Home to create a light group, the brightness mapping adjustment for this light group is incorrect. Setting 10% will become 26%, because it is multiplied by 255. I hope this bug can be fixed.

68286: ["Xiaomi", "Light Group", "mijia.light.group3"],
"spec": [
    BaseConv("light", "light", mi="2.p.1", entity={"icon": "mdi:lightbulb-group"}),  # bool
    BrightnessConv("brightness", mi="2.p.2", max=100), 
    ColorTempKelvin("color_temp", mi="2.p.3"),  # uint32, 2700..6500
],
@AlexxIT AlexxIT added the question Further information is requested label Sep 4, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Sep 4, 2024

I can't confirm your words. My groups has same model and they works with 65535 maximum.
I don't know how we can detect exact maximum for our groups it that case.

@GavinIves
Copy link
Author

In my case, I set the brightness of the light group to 1% through the plug-in, but it actually becomes 25.5%, and so on. So I feel that the brightness of the light group has been converted incorrectly. I changed the code of the light group to the above and everything is normal. Is it just my case?

@mypal
Copy link

mypal commented Sep 21, 2024

I have the same problem, and it works well when I change the 'max' parameter to 100.
This link indicates that the brightness unit is a percentage, with a scope ranging from 1 to 100.

@AlexxIT AlexxIT self-assigned this Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants