Skip to content

Commit

Permalink
Fix lightsColor method to work with api v2.0, as per magicmonkey#34
Browse files Browse the repository at this point in the history
  • Loading branch information
sinnottj committed Mar 18, 2015
1 parent cfb4814 commit 138dc34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lifx.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Lifx.prototype.lightsOff = function(bulb) {
// Set bulbs to a particular colour
// Pass in 16-bit numbers for each param - they will be byte shuffled as appropriate
Lifx.prototype.lightsColour = function(hue, sat, lum, whitecol, timing, bulb) {
var params = {stream:0, hue:hue, saturation:sat, brightness:lum, kelvin:whitecol, fadeTime:timing};
var params = {stream:0, hue:hue, saturation:sat, brightness:lum, kelvin:whitecol, fadeTime:timing, protocol: 0x1400};
var message = packet.setLightColour(params);
this._sendToOneOrAll(message, bulb);
};
Expand Down

0 comments on commit 138dc34

Please sign in to comment.