@ILey Yes, you are correct it wont show CONTROL in the IF portion but notice it says " switched on". That is meant to imply an action. Compared to if you changed the IF to Status is on, it will status. Here is an example of the two different If conditions. First line is the Control, the second is the status. Yes its a bit confusing, but you will get it with use.
If
'Alarm 5' is switched Off
Or 'Alarm 5' Status is Off
Secondly on your question regarding parenthesis, yes you highlight it, after adding and then "move line up" or down and move them where they will make sense. Here are a few screenshots of an example
Step one: I have all three lines in the program, but I want the first two nested together with an AND () for the second, so I add an AND () and it shows up at the bottom.
If
'Alarm 5' is switched Off
Or 'Alarm 5' Status is Off
And 'Bar upper cabinet' Status is Off
And (
)
Now I click on the top ( and select move line up. It now looks like this:
If
(
'Alarm 5' is switched Off
Or 'Alarm 5' Status is Off
And 'Bar upper cabinet' Status is Off
)
Now I need to move the bottom ) up as well. I click on it and select move line up. it now looks like this.
If
(
'Alarm 5' is switched Off
Or 'Alarm 5' Status is Off
)
And 'Bar upper cabinet' Status is Off
This has accomplished grouping the status is off or switched (control) off as a group combined with the and on the bottom line. For clarity I often add a second () as follows:
If
(
'Alarm 5' is switched Off
Or 'Alarm 5' Status is Off
)
And (
'Bar upper cabinet' Status is Off
)
This isn't really needed at all, especially for this program, but I have some more complex if where it makes reading it much easier; see example below.
If
'Main House' Armed Status is not Disarmed
And $Dougs_iPhone_13_home2 is 1
And (
'Main House / Garge Ovhd Mid' Logical Status is Violated
Or 'Main House / Garge Ovhd South' Logical Status is Violated
Or (
'Lock - Rear Garage' is switched Alarm Unlocked by Keypad
And 'Lock - Rear Garage' User Number is 1
)
Or (
'Lock - Front Door' is switched Alarm Unlocked by Keypad
And 'Lock - Front Door' User Number is 1
)
Or (
'Lock - Mud Room' is switched Alarm Unlocked by Keypad
And 'Lock - Mud Room' User Number is 1
)
)