Setting up a simple automation is quick and can easily be done using the Apple Home app. However, at some point, when you want to create more complex automations, you will quickly run into limitations within Apple’s own app. With Controller for HomeKit, you have the opportunity to use more triggers, execute automations only on specific weekdays, and define your own conditions. We’ll show you step by step what possibilities exist and how to make the most of them.
In this guide, we’ll walk you through an example where the lights should be turned on depending on two motion sensors. You can find more examples at the end of the post.
Creating an Automation
Under “Automations,” use the plus sign in the upper right corner to create a new automation.

Events
Next, choose from various triggers that mark the beginning of your automation. A trigger could be the state change of a device, entering or leaving home, a specific time, sunrise or sunset, an interval, or a specific date.

In our case, we choose “Motion Detected” and specify the corresponding motion sensor.

You will then see an overview of the automation in which you can add additional triggers, select conditions, define scenes and activate the automation. Furthermore, there is the option to set a name for your automation. Although this is optional, we recommend doing so for better clarity. We choose the name “Turn On Bathroom Light”.

Multiple Events for an Automation
Sometimes you might want to activate the same scene through different events, like in our example of turning on the light via two motion sensors. With Controller for HomeKit, this is not a problem. Once you have defined the start event and are in the overview, you can add additional triggers. Logically, this is an “OR” operation. As soon as one of the events occurs, the automation is executed.
Note: For some triggers, such as recurring time periods, no further triggers can be added. This is a limitation of HomeKit.

Conditions
With conditions, you can further narrow down the execution. In this case, the emphasis is on “can,” as opposed to the start event and the ultimately executed scene, conditions are optional.
Note: For some triggers, such as recurring time periods, no conditions can be defined. This is a limitation of HomeKit.
Weekdays
First of all, you can restrict the days of the week. For example, if you want the light to be turned on at detected motion only on weekdays at full brightness and to function as a night light with low brightness on weekends, you can create two separate automations and restrict the weekdays accordingly.

Device, Time, Altitude of the Sun, or Presence
A condition can be the state of a device, a defined time window, the position of the sun (between sunset and sunrise, for instance), or the presence of people.
In our example, a condition could be the light turning on only if a certain brightness threshold is exceeded. In that case, the light would only be turned on when natural daylight is insufficient.

You also have the option to add multiple conditions. You can choose whether all conditions must be met or only one.
Note: This setting doesn’t affect the weekdays. They must always be met.

Grouped Conditions
Grouped conditions allow you to create complex automations by combining both “AND” and “OR” logic within a single automation. This feature is unique and not available in any other HomeKit app.
You can create rules that are more precisely tailored to your needs by linking multiple conditions together. This reduces the need to create multiple automations for different scenarios, as the grouped conditions allow you to combine different logics in a single automation.
Imagine you want a warning light to come on if it is after 9:00 PM and either a window or a door is open.
- Events
Motion detected - Conditions
After 9:00 PM AND
(window open OR door open) - Actions
Turn on warning light
Here’s where grouping comes into play: First, you add the condition that it must be after 9:00 PM. Next, you include the condition that a window is open, and link these two conditions with “AND.” Once you’ve added at least two conditions, a plus button will appear beneath each of them. By tapping the plus button under the open window condition, you can add more conditions, like an open door, to this group and select “OR” as the connection. Of course, you can also add as many other windows and doors to the group as needed.

This means that the automation is only triggered if it is after 9 PM AND either the window OR the door is open. This gives you more control over when your automation is actually triggered.
Note: With an OR connection, multiple conditions can be met for the group to be considered true. However, only one condition needs to be satisfied for the group to be treated as true.
Scenes
When an event occurs and the conditions are met, one or more scenes are executed. You can either select an existing scene or create a new one. Within this scene, you can control any devices you want. In our example, of course, the light should be turned on in the scene.
You can add any adjustable property to the scene and set the desired state. In our case, we turn on the lamp and set the brightness to 100%. When the scene is executed, the specified properties are set to the corresponding values. All other values remain untouched and reflect the last set value. If you want the color to always be the same, instead of the last set color, you should also define this value. With “Execute” you can test the scene before saving it.

After saving, you need to select the scene in the list and can then close the scene overview.
Automatically Turn Off the Scene
You have the option to automatically turn off scenes that include the “Power State” after a defined duration. You can simply set a time span under “Turn Off.” In our example, the light will be automatically turned off after two minutes.
Note: This option is only available for scenes that turn on at least one “Power State.” The automatic turn-off only resets this switch to “off”. Other properties are not reset, and the power will not be turned on if the switch is turned off instead of on in the scene.

Activate the Automation
Don’t forget to activate the automation at the bottom using the “Activate automation” button. If this switch is not active, the automation will not be executed. Controller for HomeKit will, however, ask you for it after saving at the latest if you have forgotten to do so.

Execute the Automation Only Once
If you want to execute an automation only once, you can turn on the “Deactivate after Execution” switch. As the name suggests, after the first execution, the automation will be automatically disabled, and the automation will thus be executed only once.

Examples
To make it easier for you to get started with the world of complex automations, we’d like to provide you with a few more examples.
Turning on the Fan Based on Motion and High Temperatures
In the summer, when temperatures rise, a cool breeze is invaluable. In a HomeKit-enabled home, the fan can be automatically turned on using a motion and temperature sensor thanks to Controller for HomeKit. All you need is an automation that we’ll walk you through step by step.
Open Controller for HomeKit, go to “Automations,” and create a new automation using the plus button in the upper-right corner.

As the start event, you first select “Accessory” and then choose the motion or presence sensor, specifically when the value of “Motion Detected” corresponds to “Yes.”

Then you assign a name, “Turn on Fan,” and add the temperature as a condition. To do that, select the temperature sensor with the current temperature “greater than or equal to” the desired temperature. We’ve chosen a value of 24°C, roughly equivalent to 75°F.

Now all you need to do is add a scene that turns on the fan. If such a scene already exists, you can simply select it. Otherwise, create a new scene that turns on the “Power State” of your fan.

Remember to enable your automation using the “Enable Automation” switch at the bottom. Your automation should look like this in the end.

Leave a Reply