Can anyone help me what i for code i need setting a brightness to a Hue lamp?
And where to put it in the code?

Moderator: leecollings
You can use dimToHighDangerr wrote: ↑Sunday 24 November 2019 17:37 Goodevening,
Can anyone help me what i for code i need setting a brightness to a Hue lamp?
And where to put it in the code?
![]()
Code: Select all
return {
on = {
devices = {
2640 -- change to the ID of a switch controlling the brightness of your hue light
}
},
logging =
{
level = domoticz.LOG_DEBUG
},
execute = function(dz, item )
_G.logMarker = _G.moduleLabel
local hueLight = dz.devices(156) -- change to ID of your huelight.
local stepSize = 5 -- Adjust to the value you want
if item.active then
hueLight.dimTo(math.min( hueLight.level + stepSize, 100 ))
else
hueLight.dimTo(math.max( hueLight.level - stepSize, 0 ))
end
end
}
Users browsing this forum: No registered users and 1 guest