Skip to content

Commit

Permalink
Optimize delay time
Browse files Browse the repository at this point in the history
Change RGBWW white channel
  • Loading branch information
mlaurijsse committed Oct 15, 2017
1 parent 4692e96 commit 62683c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ MiLightPlatform.prototype._addDevices = function(bridgeConfig) {
bridgeController = new Milight.MilightController({
ip: bridgeConfig.ip || false,
type: bridgeConfig.type || 'v6',
delayBetweenCommands: bridgeConfig.delay || 100,
delayBetweenCommands: bridgeConfig.delay || 25,
commandRepeat: bridgeConfig.repeat || undefined
});

Expand Down Expand Up @@ -229,7 +229,7 @@ MiLightAccessory.prototype.setWhiteMode = function(on, callback, context) {
if( this.type.toLowerCase() == 'rgbw' || this.type.toLowerCase() == 'bridge') {
this.controller.sendCommands(this.commands.whiteMode(this.zone));
} else if (this.type.toLowerCase() == 'rgbww') {
this.controller.sendCommands(this.commands.whiteTemperature(this.zone, 100));
this.controller.sendCommands(this.commands.whiteTemperature(this.zone, 0));
} else {
var temp = 100-Math.round((this.service.getCharacteristic(Characteristic.ColorTemperature).value - 140)*100/(500-140));
this.controller.sendCommands(this.commands.whiteTemperature(this.zone, temp));
Expand Down

0 comments on commit 62683c9

Please sign in to comment.