How to Automate Xiaomi Lights with Motion Sensor

OIP 1

Automating your Xiaomi lights to respond to motion isn’t just smart—it’s incredibly satisfying. Whether you’re lighting up a hallway the moment you walk through or ensuring bathroom lights shut off automatically, pairing a Xiaomi motion sensor with your smart lights brings both convenience and energy efficiency. Here’s how to get it all set up.

Why Automate Xiaomi Lights with Motion?

The benefits are real:

  • Convenience: No fumbling for switches.
  • Energy Saving: Lights go off when you leave.
  • Safety: Avoid late-night stumbles.
  • Security: Detect unexpected movement.
  • Comfort: Create ambiance when you enter a room.

What You’ll Need

  • Xiaomi Smart Home Hub (Gateway): Critical for Zigbee-based sensors and lights.
  • Xiaomi Smart Light(s): Includes Mi LED bulbs, Yeelight, or those controlled via smart plugs.
  • Xiaomi Motion Sensor (PIR): The core trigger device.
  • Mi Home App: Central control for setup and automation.
  • Stable 2.4GHz Wi-Fi: For hub connectivity.

Phase 1: Device Setup

  1. Hub Setup
  • Plug it in.
  • Open Mi Home App > Tap “+” to add the hub.
  • Connect to your Wi-Fi and confirm it’s online.
  1. Add Your Lights
  • Ensure lights are powered.
  • In Mi Home App, go to your Hub > Add sub-device.
  • Choose your light, follow pairing steps.
  • Assign room names for clarity.
  1. Add the Motion Sensor
  • Insert battery.
  • In Mi Home App, go to Hub > Add sub-device.
  • Press the pairing button until LED flashes.
  • Assign it a room and clear name.

Phase 2: Create Automations

  1. Automation to Turn Lights On
  • In Mi Home App, go to “Automation.”
  • Tap “+” to create new automation.
  • IF: Motion is detected.
  • THEN: Turn on light(s).
  • Optionally, set brightness, color temperature, or color.
  1. Automation to Turn Lights Off
  • Create a separate automation.
  • IF: No motion detected for X minutes (try 2-3 mins to start).
  • THEN: Turn off light(s).

Advanced Tips

  • Sensor Placement: Mount at 6-8 feet high, away from windows or pets.
  • Ambient Light Condition: Use lux detection to prevent lights turning on in daylight.
  • Multiple Lights: Add them all under the same action.
  • Effective Periods: Run automations only at night if desired.
  • Battery Life: Check battery levels regularly.
  • Test Rigorously: Walk through the setup multiple times.

My Experience

The first time I set this up, I forgot the “off” automation. So the hallway light just stayed on… indefinitely. Lesson learned. Once I added the second rule, it was perfect. Enter, lights on. Leave, lights off. Super efficient and oddly satisfying.

Final Thoughts

With a Xiaomi motion sensor and a bit of setup in the Mi Home App, you’ve got a responsive, efficient lighting system. Hands-free, worry-free, and kind of fun to watch in action.

About the author

Rahul Gaur

Over the past 10 years of experience as a Content specialist, I've worked to build successful web publications focusing on SEO and researching, writing, editing and publishing content.

Add Comment

Click here to post a comment