Switch garden lights with motion sensor and on time
Posted: Wednesday 08 July 2020 20:17
Hello
I want to switch my garden lights on from sunset to switch off at 23:30
from 23:30 to sunrise it my only go on when the motions sensor detects motion.
the light has to go on for 5 minutes
from sunrise to sunset the light have to be off
I have set the timers at the tab groups
I made an little script to switch on the lights for 5 minutes.
what I can't get work is the timer functions that the light may only go on when it is between 23:30 and sunrise.
If someone has an suggestion?
Best Regards,
Patrick
I want to switch my garden lights on from sunset to switch off at 23:30
from 23:30 to sunrise it my only go on when the motions sensor detects motion.
the light has to go on for 5 minutes
from sunrise to sunset the light have to be off
I have set the timers at the tab groups
I made an little script to switch on the lights for 5 minutes.
what I can't get work is the timer functions that the light may only go on when it is between 23:30 and sunrise.
If someone has an suggestion?
Code: Select all
return
{
on =
{
devices = { 3736 }
},
execute = function(dz, item)
if item.active then
buitenverlGroup = dz.groups('Minimaal')
buitenverlGroup.switchOn().forMin(5)
end
end
}
Patrick