Simple script:
Code: Select all
return {
active = true,
logging = {
level = domoticz.LOG_INFO
marker = 'TEST '
},
on = {
devices = {
'Wasmachine2'
},
data = {
temperatures = {history = true, maxItems = 10}
},
},
-- actual event code
-- in case of a timer event or security event, device == nil
execute = function(domoticz, device)
domoticz.data.temperatures.add(device.state)
end
}I see the following error in the log:
2017-09-18 20:07:37.765 Error: dzVents: Error: 0-Watt : An error occured when calling event handler dzVentsTest
2017-09-18 20:07:37.765 Error: dzVents: Error: 0-Watt : ...moticz/scripts/dzVents/generated_scripts/dzVentsTest.lua:20: attempt to index field 'data' (a nil value)