dannybloe wrote:
So, until I make this feature (which is an interesting idea) you have to check the time yourself (and remove the timer setting completely). You can use dzVents domoticz.time property:
CODE: SELECT ALL
if (domoticz.time.hour > 0 and domoticz.time.hour < 6) then
...
end
But it would be nice if you can define a trigger and combine a time constraint. I'll consider it for 1.1.
I did this and it is not working. I don't get any errors in the log is there something wrong with my code?
Code: Select all
return{
active = true,
on = {
236, -- index of the device - 39 book motion led 237 pir 236
},
execute = function(domoticz, mySwitch)
if (domoticz.time.hour > 19 and domoticz.time.hour < 6) then
if (domoticz.devices[236].state == 'On') then
domoticz.devices[237].dimTo(20)
end
end
if(domoticz.devices[236].lastUpdate.minutesAgo > 1) then
domoticz.devices[237].switchOff()
end
end
}
thanks
Francois