nighttime not working
Posted: Monday 13 April 2020 13:51
I want to turn on my outdoor lights at night. Unfortunately, for some reason, it always turns on, ignoring the 'at nighttime' option. What do I mess up?
Code: Select all
return {
on = {
timer = { 'at nighttime' },
devices = { 'terasz mozgas' }
},
execute = function(domoticz, item)
if (item.isTimer) then
-- the timer was triggered
domoticz.devices('terasz').switchOff()
domoticz.devices('Pince elott kulteri l').switchOff()
elseif (item.isDevice and item.active) then
-- it must be the detector
domoticz.devices('terasz').switchOn().forMin(6)
domoticz.devices('Pince elott kulteri l').switchOn().forMin(6)
end
end
}