Code: Select all
return {
on = { devices = { 109 } }, -- remote
data = { GrpRed = { initial = 128 } },
execute = function(dz, device)
dz.log('Device ' .. device.name .. ' was changed', dz.LOG_INFO)
if dz.devices(109).state == 'Left_click' then -- left click
dz.data.GrpRed = dz.data.GrpRed-10
dz.log('Color red ' .. dz.data.GrpRed .. ' was changed', dz.LOG_INFO)
dz.devices(105).setRGB(dz.data.GrpRed, 255, 255) -- set bulb color
end
if dz.devices(109).state == 'Right_click' then -- right click
dz.data.GrpRed = dz.data.GrpRed+10
dz.log('Color red ' .. dz.data.GrpRed .. ' was changed', dz.LOG_INFO)
dz.devices(105).setRGB(dz.data.GrpRed, 255, 255) -- set bulb color
end
end
}
Left click should be RGB Hex d0ffff but getting 00ffff, also in debug i see " &hue=180&brightness=100&iswhite=true"
Debug Log:
- Spoiler: show
Debug Log:
- Spoiler: show