Fixed color convertion from MQTT

This commit is contained in:
Ollo 2021-01-15 18:10:17 +01:00
parent 9534368b01
commit 8789f75e27

View File

@ -13,7 +13,7 @@ function handleSingleCommand(client, topic, data)
red = tonumber(data:sub(2,3), 16) red = tonumber(data:sub(2,3), 16)
green = tonumber(data:sub(4,5), 16) green = tonumber(data:sub(4,5), 16)
blue = tonumber(data:sub(6,7), 16) blue = tonumber(data:sub(6,7), 16)
colorBg=string.char(red, green, blue) colorBg=string.char(green, red, blue)
print("Updated BG: " .. tostring(red) .. "," .. tostring(green) .. "," .. tostring(blue) ) print("Updated BG: " .. tostring(red) .. "," .. tostring(green) .. "," .. tostring(blue) )
if (displayTime~= nil) then if (displayTime~= nil) then
displayTime() displayTime()