Don call display function in MQTT module

This commit is contained in:
Ollo 2020-12-08 21:11:53 +01:00
parent 1eaf05a1ad
commit 10104b5d0e

View File

@ -9,16 +9,13 @@ function startMqtt()
if (data == "ON") then
briPercent=100
m:publish(mqttPrefix .. "/clock", "ON", 0, 0)
displayTime()
elseif (data == "OFF") then
briPercent=0
m:publish(mqttPrefix .. "/clock", "OFF", 0, 0)
displayTime()
else
if (tonumber(data) >= 0 and tonumber(data) <= 100) then
briPercent=tonumber(data)
m:publish(mqttPrefix .. "/clock", tostring(data), 0, 0)
displayTime()
end
end
end