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

transitiontime is in multiples of 100ms #100

Closed richardwillars closed 7 years ago

richardwillars commented 7 years ago

Tried setting transitiontime to 1000 and it took a very long time to change state. I checked the Philips Hue docs and it says the following:

transitiontime - uint16 The duration of the transition from the light’s current state to the new state. This is given as a multiple of 100ms and defaults to 4 (400ms). For example, setting transitiontime:10 will make the transition last 1 second.

Might be worth updating the documentation on this library to reflect this behaviour :)

peter-murray commented 7 years ago

Can you please elaborate on the actual function call you made, as I already perform conversion from milliseconds into the actual hue value that the API takes, but maybe I have missed a possible call in the code and am not transforming it correctly in all places.

richardwillars commented 7 years ago

I've only noticed it when using the setLightState function.. I haven't tried any other functions which may specify a transitiontime as well

peter-murray commented 7 years ago

How are you building the light state, manually as a JSON object, or via a light state object?