Condition Block
Condition block gives you an ability to perform different actions based on the result of a condition check.
In case the condition evaluates to True the automation continues with the path from the Green checkmark
. In case the condition evaluates to False the the automation continues with the path from the Red X mark
.
Table of contents
🎬 Video tutorial
Checking multiple conditions
You can specify multiple conditions in the Condition block. A combination of AND and OR conditions is possible.
For example you can check that the time is between certain hours OR that the device state is set to a certain vale and proceed to the Green checkmark
path if either of them is true. Or you can specify that both of them must be true for the automation to continue to the Green checkmark
path.
This makes it simple to perform more complex conditions within the same Condition block.
Using data from the system
In the Condition block you can reference data available in your system or from the previous steps in this automation.
Possible data:
- System time - you can select hour, minute, day, month, year, weekday and more
- Any state of your devices - for example you can check whether a brightness of a light sensor (in Lux) is greater than a certain number
- Results from previous steps in automation - for example a value of the trigger or a result of a certain action
Working with KNX
To learn how to use values directly from KNX in Condition blocks, check the Working with KNX in Automations guide.
Handling errors
In some cases during the Condition an error can occur.
This can happen if the device you are using in condition to verify it's state is offline or if you have entered an invalid calculation.
You can decide what to do in case the error occurs. Here are the possible options:
For example if something goes wrong you can abort the whole automation (you will see a failed status in the Run History) or Handle the condition in a separate branch as shown below (this will be useful to send a notification for certain critical automations).
You can select to handle any issues in a separate branch. See orange alert branch above.
Advanced conditions
Within each condition's left or right side you can use advanced data transformation, maths and more.
Check the Transform data in Dynamic input
section in our Transform data in Automations guide to learn more.