Code: Select all
return {
active = true,
on = {
devices = {
'dzVents'
},
},
-- actual event code
-- in case of a timer event or security event, device == nil
execute = function(domoticz, device)
if (device.state == "On") then
local test = domoticz.devices('Vakantie')
test.switchOn()
end
end
}2017-07-11 23:43:44.980 User: Wizzard72 initiated a switch command (764/dzVents/On)
2017-07-11 23:43:45.443 dzVents: Info: Handling events for: "dzVents", value: "On"
2017-07-11 23:43:45.444 dzVents: Info: ------ Start internal script: dzVentsTest: Device: "dzVents (Domoticz Dummy Switches)", Index: 764
2017-07-11 23:43:45.444 Error: dzVents: Error: Method switchOn is not available for device "Vakantie" (deviceType=Lighting 1, deviceSubType=X10). If you believe this is not correct, please report.
2017-07-11 23:43:45.444 dzVents: Info: ------ Finished dzVentsTest