Here's my dzVents script;
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 = {'DummyTest'},timer = {}},
data = {
achtertuinRaamLux = { history = true, maxItems = 10 }
},
-- actual event code
-- in case of a timer event or security event, device == nil
execute = function(domoticz, device)
domoticz.data.achtertuinRaamLux.add(domoticz.devices('AchtertuinRaamLux').lux)
-- how further with 'smoothItem(itemIdx, [smoothRange])' ?
end
}