Don call display function in MQTT module
This commit is contained in:
parent
1eaf05a1ad
commit
10104b5d0e
3
mqtt.lua
3
mqtt.lua
@ -9,16 +9,13 @@ function startMqtt()
|
|||||||
if (data == "ON") then
|
if (data == "ON") then
|
||||||
briPercent=100
|
briPercent=100
|
||||||
m:publish(mqttPrefix .. "/clock", "ON", 0, 0)
|
m:publish(mqttPrefix .. "/clock", "ON", 0, 0)
|
||||||
displayTime()
|
|
||||||
elseif (data == "OFF") then
|
elseif (data == "OFF") then
|
||||||
briPercent=0
|
briPercent=0
|
||||||
m:publish(mqttPrefix .. "/clock", "OFF", 0, 0)
|
m:publish(mqttPrefix .. "/clock", "OFF", 0, 0)
|
||||||
displayTime()
|
|
||||||
else
|
else
|
||||||
if (tonumber(data) >= 0 and tonumber(data) <= 100) then
|
if (tonumber(data) >= 0 and tonumber(data) <= 100) then
|
||||||
briPercent=tonumber(data)
|
briPercent=tonumber(data)
|
||||||
m:publish(mqttPrefix .. "/clock", tostring(data), 0, 0)
|
m:publish(mqttPrefix .. "/clock", tostring(data), 0, 0)
|
||||||
displayTime()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user