That's what i do, but it doesn't works. If i remove the 'time' part works fine obviously... so i'm not using correctly the time function of dzvents.... any help is very appreciated, thanks in advance.
Code: Select all
return {
active = true,
on = {
devices = {
'Sensore Movimento'
}
},
execute = function(domoticz, Bagno)
if domoticz.devices('Sensore Movimento').state == 'On' then
if (domoticz.time.hour > 23 and domoticz.time.hour < 7) then
domoticz.devices('Bagno Lampada').switchOn().forMin(2)
end
end
end
}