Fix LUA syntax
This commit is contained in:
parent
de47de1e6f
commit
b95f59ee7f
2
mqtt.lua
2
mqtt.lua
@ -42,7 +42,7 @@ if (mqttServer ~= nil and mqttPrefix ~= nil) then
|
|||||||
print "Started MQTT client"
|
print "Started MQTT client"
|
||||||
oldBrightness=0
|
oldBrightness=0
|
||||||
tmr.alarm(5, 10000, 1 ,function()
|
tmr.alarm(5, 10000, 1 ,function()
|
||||||
if (oldBrightness <> briPercent) then
|
if (oldBrightness ~= briPercent) then
|
||||||
m:publish(mqttPrefix .. "/brightness", tostring(briPercent), 0, 0)
|
m:publish(mqttPrefix .. "/brightness", tostring(briPercent), 0, 0)
|
||||||
end
|
end
|
||||||
oldBrightness = briPercent
|
oldBrightness = briPercent
|
||||||
|
Loading…
Reference in New Issue
Block a user