amimof / huego

An extensive Philips Hue client library for Go with an emphasis on simplicity
MIT License
250 stars 36 forks source link

setting state.on to the right value after sending state changes to the bridge #38 #39

Closed willie68 closed 3 years ago

willie68 commented 3 years ago

THis is the simple solution. At the moment the response of the bridge will not be evaluated. (Maybe in the next step)

amimof commented 3 years ago

@willie68 Thanks for contributing 👏 Please tell me when this is ready for review

willie68 commented 3 years ago

I think review can happen now. I don't know why travis can't build this...

amimof commented 3 years ago

How about if Bri is set to 0, i guess the state.on would always be true in any case?

willie68 commented 3 years ago

Changed the comments, added comment on ConvertRGB, adding tests. Beside the ConvertRGBToXy Test, all tests are failing on my side. (Maybe because the Hue is not responding, because it's off. :-) )

amimof commented 3 years ago

@willie68 Did you read my latest comment about Bri being 0 and what the expected behavior would be?

willie68 commented 3 years ago

I just tested with bri = 0 and the light are not off, it's the lowest possible brightness but it's not off. So setting lights to bright 0 will not shut them down. That means state.on = true even if the bri is 0.

willie68 commented 3 years ago

Just missed a single light.State.On = true