Control Lights with Multiple Motion Sensors

Control lights with multiple motion sensors workflow preview

In large or irregularly shaped spaces - such as an L-shaped hallway - you often want to control the lighting using multiple motion sensors. With a workflow and the Controller Hub in Controller for HomeKit, that's easily done. This step-by-step guide shows you exactly how to set it up. We'll use two motion sensors and one presence sensor, but you can add as many sensors as you like.

Start Event

First, add all motion and presence sensors as start events. To ensure the workflow is triggered by any change - not just a specific state like motion detected or no motion - tap on "equal to" and select "any".

Start events for multiple motion and presence sensors

Steps

Add an "If/Else" Step

Add an If/Else step and include all motion sensors that have not detected motion as conditions. Make sure to set the comparison operator to "And".

Add a "Wait" Step

In the "If" step, add a 30-second Wait step. This defines how long the light should remain on after no motion is detected. Feel free to adjust the duration to suit your needs - 30 seconds has worked well in our setup.

Add a "Control Accessory" Step

Also in the If step, set the power state of all lights to off.

If/Else workflow with wait step and lights off action

Add a "Control Accessory" Step

In the Else case, set the power state of all lights to on. You can also define a specific brightness or color if desired.

Else branch workflow setting lights on

Settings

Under Settings, set Restart Workflow to "Stop the current workflow and start a new one".

This ensures that if all motion sensors stop detecting motion, but one detects movement again within the 30-second delay, the light remains on.

Workflow settings with restart behavior configuration

Final Overview

As soon as one of the motion sensors detects movement, the light turns on. It will only turn off when all motion sensors stop detecting motion and no motion is detected again within the following 30 seconds.

Final workflow overview for multiple motion sensors
Download on the App Store

Get Inspired

Meeting Light

Meeting Light

Uses light color to show whether you’re in a meeting.

Waste Calendar

Waste Calendar

Never forget the bin again – with colored light and speech.

Carbon Dioxide Alert

Carbon Dioxide Alert

Get notified when COβ‚‚ levels exceed 1000 ppm.

Location-Based Workflow

Location-Based Workflow

Automate your routines based on where you are.

Laundry Done Alert

Laundry Done Alert

Receive a notification when your washing machine has finished.

Beat the Heat

Beat the Heat

Automatically close your blinds on hot days.

Wake-Up Light

Wake-Up Light

Use any Apple Home Lamp as a Wake-Up Light.

Irrigation Schedule

Irrigation Schedule

Keep your garden green.

Control Lights with Multiple Motion Sensors

Control Lights with Multiple Motion Sensors

For large or irregularly shaped spaces.

Stepwise Brightness Control via Button

Stepwise Brightness Control via Button

Control light brightness step by step.

Custom Notification with Live Camera Feed

Custom Notification with Live Camera Feed

Open the camera stream instantly.

Smart Bathroom Fan Control

Smart Bathroom Fan Control

Make your fan truly intelligent.

New Mail Notification

New Mail Notification

Get notified when new mail arrives.

Integrate Speakers into Workflows

Integrate Speakers into Workflows

Control volume, play music, or pause playback.

Battery Warning

Battery Warning

Get battery alerts when they matter.

Sleep Timer

Sleep Timer

Use a sleep timer with Apple Home.

Execute Workflow Only Once a Day

Execute Workflow Only Once a Day

Ensures the workflow runs only once.

Accessory Values in Notifications

Accessory Values in Notifications

Send notifications featuring real-time accessory values.

NFC Tags

NFC Tags

Automate Apple Home Accessories with NFC.

Blink Lights

Blink Lights

Make a light blink and effortlessly return it to its original state.

Display Camera When Motion Is Detected

Display Camera When Motion Is Detected

Automatically display the camera livestream whenever motion is detected.

Open Window Reminder

Open Window Reminder

Get a reminder if you forget to close a window after ventilating.

Toggle Lamp

Toggle Lamp

Easily toggle a lamp using a single switch.

Turn Light Off Using Motion Sensor

Turn Light Off Using Motion Sensor

Efficiently control your lighting with a motion sensor.