Update utils

This commit is contained in:
2026-10-07 23:39:39 +02:00
parent fde97bb896
commit c351ce490f
10 changed files with 1010 additions and 59 deletions
+1 -10
View File
@@ -49,19 +49,10 @@ do
---@param groupAddress string
---@param value number
Send = function(dpt, groupAddress, value)
local tParams = {}
local tParams = C3C.KnxCodec.For(dpt).encode(value)
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,