dynamically dimming without burning my eyes at night
Posted: Tuesday 23 July 2019 12:11
appologies if this has been asked before, i got back 4 pages and couldnt find anything relating to this
im wanting to alter my current DZvents script to allow for a slight alteration
if hall sensor is activated after midnight, i want it to only turn the lights on at a certain level, say 10%
no i know i can do this, but previously i have to set the light back to 100% before i turn it off so it will be back at 100 % the next morning....
is there a way to set the light level while the light is off?
so that way i could say light.switchon.level(20)
and when im done 2 min later light.switchoff.level100
below is my current script
im wanting to alter my current DZvents script to allow for a slight alteration
if hall sensor is activated after midnight, i want it to only turn the lights on at a certain level, say 10%
no i know i can do this, but previously i have to set the light back to 100% before i turn it off so it will be back at 100 % the next morning....
is there a way to set the light level while the light is off?
so that way i could say light.switchon.level(20)
and when im done 2 min later light.switchoff.level100
below is my current script
Code: Select all
return {
on =
{
devices = {
'Hall Motion'
},
timer = {
'at nighttime'
}
},
execute = function(domoticz, device)
if
( device.state == 'On')
then
if (domoticz.devices('Mood Light').state == 'Off')
then
domoticz.devices('Mood Light').switchOn().forMin(1)
domoticz.log('Hall Montion Sensor Detected Turn light on')
end
end
end
}