Skip to content

Commit

Permalink
fix momentary when times is null
Browse files Browse the repository at this point in the history
  • Loading branch information
heythisisnate committed Apr 17, 2020
1 parent 6d186e0 commit cdcbb13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lfs/aws_iot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ c:on('message', function(_, topic, message)
table.insert(sensorPut, endState)

-- set state back to initial after momentary is complete
if payload.momentary and payload.times > 0 then
if payload.momentary and payload.times ~= -1 then
revertIn = (payload.momentary + payload.pause) * payload.times - payload.pause
tmr.create():alarm(revertIn, tmr.ALARM_SINGLE, function()
local revertState = { pin = endState.pin, state = endState.state == 0 and 1 or 0}
Expand Down
2 changes: 1 addition & 1 deletion src/lfs/device.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ local me = {
id = "uuid:8f655392-a778-4fee-97b9-4825918" .. string.format("%x", node.chipid()),
name = "Konnected",
hwVersion = "2.3.0",
swVersion = "2.3.4",
swVersion = "2.3.5",
http_port = math.floor(node.chipid()/1000) + 8000,
urn = "urn:schemas-konnected-io:device:Security:1"
}
Expand Down

0 comments on commit cdcbb13

Please sign in to comment.