[Solved] LUA script with beacon key + Security Panel
Posted: Wednesday 01 July 2020 13:32
We struggle with the script below. It won't "fire".
The script is working well without the text "and (otherdevices['Domoticz Security Panel'] == 'Disarmed')) then"
But what we want is that it only works when the Security Panel is "Disarmed" or when it is "Arm Away"
What have we done wrong?
Thanks in advance for the support.
The script is working well without the text "and (otherdevices['Domoticz Security Panel'] == 'Disarmed')) then"
But what we want is that it only works when the Security Panel is "Disarmed" or when it is "Arm Away"
What have we done wrong?
Thanks in advance for the support.
Code: Select all
commandArray = {}
if ((devicechanged['Beacon key'] == 'Off') and (otherdevices['Domoticz Security Panel'] == 'Disarm')) then
commandArray['Domoticz Security Panel'] = 'Arm Away'
commandArray['Variable:Security'] = 'On'
else
if ((devicechanged['Beacon key'] == 'On') and (otherdevices['Domoticz Security Panel'] == 'Arm Away')) then
commandArray['Domoticz Security Panel'] = 'Disarm'
commandArray['Variable:Security']= 'Off'
end
end
return commandArray