Or command

You can use an Or command to allow multiple conditionals to activate programming. If any conditional grouped with an Or command is true, the programming continues.

Example: The example in this section shows how to use conditionals and an Or command in programming. If a light is off when the doorbell is pressed and it's night time, the light is programmed to turn on.

To program a conditional with an Or command:

  1. Follow the example in "Programming with conditionals". These next steps start after that example.

<continued from the steps in "Programming with conditionals">

  1. To add an And command, in Programming Controls, click Or and drag it on top of the conditional in the Script window. The Expression Builder opens to help you build your complex conditional statement.
  1. In the Device Actions pane project tree, select the Scheduler.
  2. Click Time and Night time.
  3. Drag the conditional 'If time is night time' to the Script pane below the OR symbol.
  1. Click Finish to close the Expression Builder. The complex condition now reads 'If <room>->Front Door Light is off OR If time is night time'.

    When the doorbell is pressed, the Front Door Light will turn on if the light is off OR if it is night time.