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

Strange Behavior when setting Brightness #135

Open
challgren opened this issue Feb 9, 2025 · 4 comments
Open

Strange Behavior when setting Brightness #135

challgren opened this issue Feb 9, 2025 · 4 comments

Comments

@challgren
Copy link

Hi so I'm using your plugin and measuring some lights for Powercalc and we are noticing that when setting the brightness to 5 value between 1-255 that your plugin will report back brightness at 25 instead of the expected value of 5. I reviewed a bit of the code and it appears that light.py has 2 different equations to calculate brightness. One called brightness_to_hass and the other _brightness_to_hubspace. I'm wondering if based on our testing and measurements if the equations are incorrect.

We've been discussing this at bramstroker/homeassistant-powercalc#3034

@Expl0dingBanana
Copy link
Collaborator

What version of the plugin are you using?

@challgren
Copy link
Author

What version of the plugin are you using?

v4.2.0

@Expl0dingBanana
Copy link
Collaborator

Can you try this with the pre-release, dev-aiohubspace-1.0? I have made a few changes (not sure theyll affect anything) but I have confirmed on that dev release the values that are set come back as expected.

@challgren
Copy link
Author

I tried and it appears to be coming back correct. I did just update to the version you released about 8 hours ago. I'll redo my measurements and see if we experience the same spike. When I was trying to test the new version I would set the state and set brightness to 5 and it appears to keep that value but wouldnt transmit it to the lights. But maybe its my lack of knowledge on the way to manually set a light color.

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

No branches or pull requests

2 participants