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

Device value switches between 10 and 26 when set to 10 #271

Open
MParnaby opened this issue Jan 12, 2025 · 0 comments
Open

Device value switches between 10 and 26 when set to 10 #271

MParnaby opened this issue Jan 12, 2025 · 0 comments

Comments

@MParnaby
Copy link

Hello!

If I set a device value (brightness) to 10 in the Alexa app, the value then switches between 10 and 26 in the app. It's pretty obvious that the max value is 255 (not 100) so all values set in the app are multiplied by 2.55 at some point. After about 40 this behavior stops, I assume because the value returned is 102 and out of the range of the 0-100 slider in the app.

I can't fix this myself. I've tried modifying the brightness value in _onTCPControl (casting the value divided by 2.55 to an int) without success. I can, with some messing about in the code, get the value to switch between 10 and 4 in the app. That's not what I want either. It seems that sometimes the percentage value is sent to the app from fauxmo and sometimes the absolute (0-255) value is sent to the app.

I can perhaps fix this, but I feel like there's something obvious that I'm missing. Anyway, any help gratefully received! If I can fix this myself I'll put a PR in.

Screenshots to illustrate the issue.

image

image

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

1 participant