peter-murray / node-hue-api

Node.js Library for interacting with the Philips Hue Bridge and Lights
Apache License 2.0
1.19k stars 145 forks source link

Change lightState to use an internal state object #22

Closed Doridian closed 9 years ago

Doridian commented 9 years ago

Otherwise calling "on" would not work if you already called either "on" or "off" due to the property being named like the function. Same goes for stuff like "rgb"

peter-murray commented 9 years ago

Thanks for pointing out the flaws in the light state object.

I appreciate the pull request, but based on how bad my implementation is, I am rewriting this module for the 1.0.0 release of the library which I am currently preparing for release soon.

peter-murray commented 9 years ago

I have now implemented a completely new LightState object in the dev-1.0.0 branch that resolves the issues you have pointed out, check it out here 396739d6320ab241726bb394e678de74bbbdfae8.

Thanks