iobroker.wifilight
Advanced tools
Comparing version 0.0.28 to 0.0.29
{ | ||
"common": { | ||
"name": "wifilight", | ||
"version": "0.0.28", | ||
"version": "0.0.29", | ||
"title": "WiFi Light", | ||
@@ -6,0 +6,0 @@ "desc": { |
{ | ||
"name": "iobroker.wifilight", | ||
"version": "0.0.28", | ||
"version": "0.0.29", | ||
"description": "WiFi Light Adapter", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -138,2 +138,3 @@ "use strict"; | ||
if (device.cmds.decodeResponse) devices.invalidate(id); | ||
device.stopRunningProgram(); | ||
device.onStateChange(channelName, stateName, state.val); | ||
@@ -317,2 +318,7 @@ } | ||
WifiLight.prototype.stopRunningProgram = function () { | ||
this.prgTimer.clear(); | ||
this.refreshPaused = 0; | ||
}; | ||
WifiLight.prototype.runJsonProgram = function (channel, cmds) { | ||
@@ -322,3 +328,2 @@ var i = -1, self = this; | ||
this.prgTimer.clear(); | ||
this.refreshPaused = true; //this.refreshPaused === undefined ? 1 : this.refreshPaused + 1; | ||
@@ -337,4 +342,7 @@ function doIt() { | ||
} | ||
if (cmds.length > 0) doIt(); | ||
else this.refreshPaused = 0; | ||
if (cmds.length > 0) { | ||
this.refreshPaused = true; //this.refreshPaused === undefined ? 1 : this.refreshPaused + 1; | ||
doIt(); | ||
} | ||
else this.stopRunningProgram(); | ||
}; | ||
@@ -891,2 +899,4 @@ | ||
function main() { | ||
@@ -893,0 +903,0 @@ |
71773
1390