Closed kvendrik closed 9 years ago
Thanks for your kind words.
The LightState object is meant to be a throw away object, used to compose a single state (i.e. on with a particular color) and then used with a light state call to the API. If you do try to reuse the existing state object (and modify some values), then it is likely that you could get some odd behaviour.
The reason that I did it this way was to support developers that want to just pass the pure JSON state object that is documented in the official Phillips Hue API, instead of having to use the LightState object which is really just a fluent interface wrapper.
I will take a look at writing a test or two to see if I can reproduce the issue with reusing the state object across multiple lamps and come back to you on this.
This was a bug I introduced in the 0.2.5 release...
It is now fixed in 0.2.6, and I have tested it with your cli project and it works as expected.
Hi Peter,
First of all, awesome API! Great job! :+1:
Alright, so I recently started making a Hue CLI using your API and got some unexpected behaviour when using one state object for multiple lamps. I fixed this by creating a new state for each lamp. Have a look at the commit message below, any idea why this is happening?