Smart Lighting with Home Assistant and Motion Sensors
0
0
- #IoT

2m read
Motion-Activated Lighting with Home Assistant
This guide explains how to set up motion-activated lighting in Home Assistant, improving security and convenience. We'll integrate a motion sensor and a smart bulb, so the light turns on when motion is detected and off after a period of inactivity.
Prerequisites
- Home Assistant installation
- A compatible motion sensor (e.g., Zigbee or Z-Wave)
- A smart bulb (e.g., Philips Hue, LIFX, or a Zigbee bulb)
- Zigbee or Z-Wave Hub, if needed
Setup Steps
- Integrate Motion Sensor: Add your motion sensor to Home Assistant through Zigbee2MQTT, Z-Wave JS, or the native integration if it is wi-fi.
- Integrate Smart Bulb: Add your smart bulb using its integration, such as the Philips Hue or LIFX integration.
- Create Automation: In Home Assistant, create a new automation in
Configuration -> Automations -> + Create Automation
. - Configure Trigger: Set the trigger to the motion sensor's state changing to 'detected' or 'on'.
- Configure Action: Add an action to turn on the smart bulb using the
light.turn_on
service. - Add Condition (Optional): Add a condition so that the automation only runs at night. Use state or sun condition.
- Create Second Automation: Create a second automation to turn off the light after a specified period of no motion.
- Second Automation Trigger: Set the trigger to the motion sensor's state changing to 'clear' or 'off'.
- Second Automation Action: Add a delay action for the desired period (e.g., 5 minutes). Then, add an action to turn off the smart bulb using the
light.turn_off
service.
Device Integration Tips
- Ensure your motion sensor and smart bulb are within range of their respective hubs or the Home Assistant server.
- Use Zigbee or Z-Wave devices for reliable and low-latency communication.
Best Practices for Reliability
- Regularly update Home Assistant and device integrations.
- Use a dedicated Zigbee or Z-Wave hub for better performance and reliability.
- Monitor the battery levels of your motion sensors and replace them when needed.
By following these steps, you can create a reliable and convenient motion-activated lighting system with Home Assistant.

Written by:
NGC 224
Author bio:
There are no comments yet
loading...