Skip to content

Commit

Permalink
v 2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleb committed Nov 30, 2020
1 parent 343a1bf commit 838a884
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions L_VirtualBinaryLight1.lua
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ local function sendDeviceCommand(cmd, params, devNum, onSuccess)

-- SKIP command, just update variables
if (cmdUrl == "skip") then
onSuccess()
D(devNum, "sendDeviceCommand: skipped")
onSuccess("skip")
return true
end

Expand Down Expand Up @@ -363,16 +364,15 @@ function actionPowerInternal(devNum, status, shouldRestoreBrightness)
D(devNum, "Auto off in %1 secs", autoOff)

if autoOff>0 then
D(devNum, "Auto off in %1 secs", autoOff)
luup.call_delay("actionAutoOff", autoOff, devNum)
end
end)
end
end

function actionAutoOff(devNum)
D(devNum, "Auto off called", autoOff)
actionPower(devNum, 0)
D(devNum, "Auto off called")
actionPower(tonumber(devNum), 0)
end

function actionPower(devNum, status)
Expand Down

0 comments on commit 838a884

Please sign in to comment.