Default light percentage every day
Posted: Wednesday 02 October 2019 11:21
Hi everyone, is there a script that every morning brings me 100% values of all dimmable lights without turning them on?
Open source Home Automation System
https://forum.domoticz.com/
Code: Select all
return
{
on =
{
devices = { 'Led Living' },
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = 'dim based on time'
},
execute = function(dz, item)
dz.log('Studio stato: ' .. item.state,dz.LOG_DEBUG)
if item.active and item.lastUpdate.secondsAgo > 4 then
if dz.time.matchesRule('at 06:30-15:00') then
item.dimTo(20).silent()
end
if dz.time.matchesRule('at 15:00-17:00') then
item.dimTo(50).silent()
end
if dz.time.matchesRule('at 17:00-06:30') then
item.dimTo(100).silent()
end
elseif item.lastUpdate.secondsAgo > 4 then
item.dimTo(0).silent()
end
end
}