LUA and dummy contact switch
Posted: Wednesday 07 October 2015 13:49
Can you change the status of a contact switch through LUA?
I am trying the code below but it does not function
Test is a dummy on/off
Back Door is a dummy contact and showing closed.
Turn test on should open Back Door contact?
I am trying the code below but it does not function
Code: Select all
commandArray = {}
if (devicechanged['test'] == 'On' and otherdevices['Back Door'] == 'Closed') then
commandArray['Back Door']='Open'
print('Back Door Open')
else commandArray['Back Door']='Closed'
end
return commandArray
Back Door is a dummy contact and showing closed.
Turn test on should open Back Door contact?