Fix dpt 232 sends
This commit is contained in:
@@ -52,7 +52,15 @@ do
|
||||
local tParams = {}
|
||||
tParams.DATA_POINT_TYPE = dpt
|
||||
tParams.GROUP_ADDRESS = groupAddress
|
||||
|
||||
if dpt == "DPT_232" then
|
||||
local hex = string.format("%06x", value)
|
||||
tParams.R = tonumber(hex:sub(1,2), 16)
|
||||
tParams.G = tonumber(hex:sub(3,4), 16)
|
||||
tParams.B = tonumber(hex:sub(5,6), 16)
|
||||
else
|
||||
tParams.VALUE = value
|
||||
end
|
||||
|
||||
send("SEND_TO_KNX", tParams)
|
||||
end,
|
||||
|
||||
Reference in New Issue
Block a user