I want to put my Philips Hue lights gradually brighter (from 0% to 100% with steps of 1% per minute) when the sun goes down (trigger).
I tested a small blocky script with multiple "set X = X after X seconds", but that didn't work. Only the last one does work...
Now I am testing with LUA, but that's not that easy for me because I'm not a programmer.
I searched some forum's and Google already, and have this at the moment:
Code: Select all
commandArray = {}
function wait(waitTime)
timer = os.time()
repeat until os.time() > timer + waitTime
end
if (devicechanged['TEST'] == 'On') then
commandArray['Hue']='Set Level 10'
wait(10)
commandArray['Hue']='Set Level 100'
end
return commandArray
Does anyone know a better solution for me or push me in the right direction?
(already found the "Easiest way to make lua script wait/pause/sleep/block for a few seconds" forum page, but I can't get it working
