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

Bug in computation of colour temperature? #47

Closed
LiSongMWO opened this issue Nov 15, 2018 · 1 comment
Closed

Bug in computation of colour temperature? #47

LiSongMWO opened this issue Nov 15, 2018 · 1 comment
Assignees

Comments

@LiSongMWO
Copy link

LiSongMWO commented Nov 15, 2018

On the line here:

return int((float64(1) / float64(colorTemperature)) * float64(1000000))

If you pass 6500K the result of the computation will be 153.846153846 which will truncate to 153 due to use of int(). According to here the range is 500-154. So 6500K mapping to 153 would be out of range
.

@LiSongMWO LiSongMWO changed the title Error in computation of colour temperature. Bug in computation of colour temperature. Nov 15, 2018
@LiSongMWO LiSongMWO changed the title Bug in computation of colour temperature. Bug in computation of colour temperature? Nov 15, 2018
@stefanwichmann stefanwichmann self-assigned this Nov 19, 2018
@stefanwichmann
Copy link
Owner

Hi Emily,

thanks for reporting this. The official documentation at https://developers.meethue.com/documentation/lights-api (sadly behind a login) states

connected lights are capable of 153 (6500K) to 500 (2000K).

Kelvin is implemented in regards to this official specification as close as possible.

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