Got a strange behavior since I created a LUA script. State send to log seems always one step behind. Please see the behavior in this simple test script. Any clue?
Thx M.
log:
018-09-26 19:32:45.728 dzVents: Info: Handling events for: "Dummy schakelaar", value: "On"
2018-09-26 19:32:45.728 dzVents: Info: ------ Start internal script: test: Device: "Dummy schakelaar (Dummy)", Index: 157
2018-09-26 19:32:45.728 dzVents: Info: Hey! I am Open!
2018-09-26 19:32:45.728 dzVents: Info: ------ Finished test
script:
Code: Select all
return {
on = {
devices = {
'Dummy schakelaar'
}
},
execute = function(domoticz, switch)
if (switch.state == 'On') then
domoticz.log('Hey! I am Open!')
else
domoticz.log('Hey! I am Close!')
end
end
}