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?