best

How to add occupancy aware lighting to every room

Add occupancy aware lighting to every room using local-first tools like Home Assistant, with practical advice for HomeKit and Hubitat users.

Last updated: 2026-05-23

Occupancy aware lighting is one of the simplest, most effective ways to make your smart home more efficient and comfortable. It ensures lights are only on when someone is present, reducing waste and improving usability. While many people rely on motion sensors, the key to a truly smart lighting system is integrating occupancy detection with lighting control in a way that works across your entire home. This guide focuses on building a local-first smart home using Home Assistant, but also includes notes for HomeKit and Hubitat users.


Choose the Right Occupancy Sensors

The foundation of any occupancy-aware lighting system is the sensor. These devices detect movement and trigger actions like turning lights on or off. While motion sensors are common, they can be unreliable in certain spaces — like hallways or rooms with open layouts. For a more accurate and responsive system, consider occupancy sensors that use PIR (Passive Infrared) or PIR + UWB (Ultra-Wideband) to detect presence more precisely.

For Home Assistant, the Aqara Motion Sensor P2 is a solid choice. It’s a Z-Wave device that integrates cleanly with Home Assistant and provides reliable occupancy detection. If you’re using HomeKit, the Apple HomePod mini or Apple HomePod 2nd Gen can act as a motion sensor if paired with a third-party sensor like the Everything Presence One. For Hubitat, the Everything Presence One is a great option, as it supports both Zigbee and Z-Wave and works well with Hubitat’s ecosystem.

Avoid cheap, low-quality sensors that may trigger false positives or fail after a few months. Invest in a sensor that’s durable, accurate, and has good integration support. If you’re using Zigbee, the Zooz ZEN34 Remote Switch can also double as an occupancy sensor if paired with a motion detection module. For Z-Wave, the Aqara Motion Sensor P2 or Zooz Zen34 are both excellent options.


Integrate Sensors with Lighting Control

Once you have your occupancy sensor, the next step is to connect it to your lighting. This is where your choice of platform matters. For Home Assistant, you can use the built-in automation to link sensors with lights. For example, you can set up an automation that turns on lights when the sensor detects motion and turns them off after a set period of inactivity.

If you’re using Zigbee or Z-Wave, you can use a smart switch or dimmer to control your lights. The Philips Hue Lightstrip Plus is a good option for strip lighting, as it supports both Zigbee and Z-Wave and integrates well with Home Assistant. For HomeKit, the Philips Hue Smart Plug is a versatile device that can control any compatible light, and it works well with HomeKit through the Philips Hue Bridge.

If you’re using Hubitat, the Shelly Plus 1 or Shelly Plus 1 Mini Gen3 are great choices for smart switches. These devices support both Zigbee and Z-Wave and can be used to control individual lights or groups of lights. For Home Assistant, the Shelly Plus 1 is also a good option, especially if you’re using the Home Assistant Connect ZBT-1 to bridge Zigbee devices.

When setting up your automation, consider the delay between motion detection and light activation. A 10-30 second delay is usually sufficient, but you can adjust this based on your room layout. Also, make sure to set up lighting scenes or groups so that multiple lights can be controlled together. For example, a hallway might have multiple lights that turn on together when motion is detected.


Use Local Automation for Better Control

One of the biggest advantages of a local-first smart home is the ability to run automation directly on your local network, without relying on cloud services. This is especially important for Home Assistant, where you can run all your automation locally using Home Assistant Core. This means your lights will respond instantly to motion, without any latency or reliance on external servers.

For HomeKit, you’ll need to use a local HomeKit server like Home Assistant or Hubitat to run your automation locally. This avoids the delays and potential privacy issues of using Apple’s cloud-based HomeKit. Similarly, Hubitat allows for local automation and integrates with a wide range of devices, making it a great choice for a local-first setup.

If you’re using Zigbee or Z-Wave, make sure your gateway or hub is running locally. For example, the ConBee III or Zigbee Me RZB7 Pro are excellent local Zigbee hubs for Home Assistant. For Z-Wave, the Home Assistant Green or Home Assistant Yellow are great options for local Z-Wave support.


Handle Edge Cases and Tradeoffs

Occupancy-aware lighting isn’t perfect. There are tradeoffs to consider. For example, motion sensors can trigger lights in empty rooms if someone walks past a door or window. To mitigate this, use occupancy sensors that detect presence for longer periods, or pair them with door sensors to ensure lights only turn on when someone enters a room.

Another consideration is lighting levels. While motion sensors can turn lights on, they often don’t adjust brightness based on ambient light. For a more refined experience, use light sensors like the Third Reality Temp Humidity Sensor or Frient Light Sensor to adjust brightness automatically. These can be paired with Philips Hue Smart Plugs or Shelly Plus 1 to create a more natural lighting environment.

Also, be aware of false positives. Some motion sensors can be overly sensitive, especially in areas with frequent movement. If you’re using a Zigbee or Z-Wave sensor, consider placing it in a central location and adjusting the sensitivity settings in your hub or automation platform.


Quick Verdict

Occupancy-aware lighting is an easy win for any local-first smart home. Choose reliable sensors like the Aqara Motion Sensor P2 or Everything Presence One, pair them with smart switches like the Philips Hue Smart Plug or Shelly Plus 1, and automate with Home Assistant for the best results. While there are tradeoffs, the benefits of energy savings and convenience make it well worth the effort.

Next steps

Compare this category side by side

If you want fewer opinions and more matrix-style tradeoffs, the comparison pages are the next stop.

See comparisons →

Inspect all products

The full product database keeps the caveats, setup notes, and compatibility details attached to each device.

Browse products →

Back up and read the explainers

If a buying guide feels too specific too fast, the guides section covers the broader local-first logic behind it.

Read guides →

Related articles

Best local-first smart home hubs

The best smart home hubs and controllers for people who care about local control, Home Assistant compatibility, and fewer long-term regrets.

Read article →

Best smart plugs with local control and energy monitoring

The best smart plugs for buyers who want real local control, useful energy data, and fewer long-term ecosystem regrets.

Read article →

Best local security cameras for Home Assistant

The best Home Assistant-friendly local camera options for buyers who care about RTSP, ONVIF, NVR compatibility, and lower cloud dependence.

Read article →