Trigger every 5 mintes after midnight if device is off
Posted: Thursday 03 August 2017 16:07
Hi,
I am new to dzVents and it looks very promising. I've started migrating some lua script to dzVents, but I am experiencing some difficulties.
By default I would like to switch off the lights after midnight, but only when the TV is off. If the tv is on, the lights should stay on and the script has to check again in 5 minutes. I guess the script should be triggered at midnight, every 5 minutes and only when the lights are on. Is this possible with dzVents?
Its a waste of time to run the script if its past midnight and the lights are already out
Thanks
I am new to dzVents and it looks very promising. I've started migrating some lua script to dzVents, but I am experiencing some difficulties.
By default I would like to switch off the lights after midnight, but only when the TV is off. If the tv is on, the lights should stay on and the script has to check again in 5 minutes. I guess the script should be triggered at midnight, every 5 minutes and only when the lights are on. Is this possible with dzVents?
Its a waste of time to run the script if its past midnight and the lights are already out
Code: Select all
return {
active = true,
on = {
timer = {
'at 00:00 every 5 minutes'
}
-- + only if device light state is on
-- is there any way?
},
execute = function(domoticz, device)
end
}