Standard dzVents template afterMin
Posted: Tuesday 21 November 2017 21:39
There is an error in the standard dzVents template:
It must be:
Suc6!
It must be:
Suc6!
Open source Home Automation System
https://forum.domoticz.com/
Code: Select all
-- Check the wiki at
-- http://www.domoticz.com/wiki/%27dzVents%27:_next_generation_LUA_scripting
return {
-- 'active' controls if this entire script is considered or not
active = true, -- set to false to disable this script
-- trigger
-- can be a combination:
on = {
devices = {
-- scripts is executed if the device that was updated matches with one of these triggers
'device name', -- device name
'abc*', -- triggers for all devices which name begins with abc
258, -- id
},
timer = {
-- timer triggers.. if one matches with the current time then the script is executed
'at 13:45',
'at 18:37',
'every 3 minutes on mon,tue,fri at 16:00-15:00'
}
},
-- actual event code
-- in case of a timer event or security event, device == nil
execute = function(domoticz, device)
--[[
The domoticz object holds all information about your Domoticz system. E.g.:
local myDevice = domoticz.devices('myDevice')
local myVariable = domoticz.variables('myUserVariable')
local myGroup = domoticz.groups('myGroup')
local myScene = domoticz.scenes('myScene')
The device object is the device that was triggered due to the device in the 'on' section above.
]] --
-- example
if (device.state == 'On') then
device.switchOff().afterMin(2)
domoticz.notify('Light info', 'The light ' .. device.name .. ' will be switched off soon')
end
end
}