wink-js icon indicating copy to clipboard operation
wink-js copied to clipboard

Setting 1% brightness results in 100% brightness

Open robertvorthman opened this issue 7 years ago • 0 comments

When setting a brightness of 1% as shown below the result is 100% brightness. wink.user().device("Lamp", function(device) { device.brightness(1, callback); });

One solution is to change line 38 of light.js to "greater than OR EQUAL to 1" so that the number 1 is properly converted to .01 on the next line. if ( value >= 1 ) { https://github.com/winfinit/wink-js/blob/eae27c104e2b305b3ffb57dd216dff7743f8bc70/lib/model/light.js#L38

robertvorthman avatar Sep 12 '17 12:09 robertvorthman