In this guide, I’ll show you how to add Xiaomi Aqara devices to Home Assistant in 2021. If you’ve added other devices to Home Assistant using ZHA, then this should pretty straightforward. These are some of the best sensors to add to Home Assistant due to their low cost and appealing looks.

We will be adding Aqara water sensors, aqara motion detectors, aqara door and window sensors, and Aqara mini switch buttons.

Let’s get started!


Prerequisites

This guide assumes you have:

  • Home Assistant installed on a raspberry pi
  • A Zigbee USB hub added to Home Assistant

If you are new to Home Assistant, or are migrating from SmartThings to Home Assistant, then you can follow my How To Add Zigbee and Zwave decices to Home Assistant guide to get setup.

Once those are configured, you are ready to start adding Aqara devices.


Aqara Devices

A quick FYI regarding Aqara devices. From what I’ve read on Reddit, you should pair the devices near the location of it’s final place. For example, if you are adding a water sensor in the guest bathroom, try pairing it from there instead of directly next to the hub.

I personally didn’t have to do this, but it’s supposed to help keep these devices reporting correctly.


How To Add Aqara Water Leak Sensor to Home Assistant

Aqara Water Leak Sensor, REQUIRES AQARA HUB, Wireless Water Leak Detector, Wireless Mini Flood Detector for Alarm System and Smart Home Automation, Water Sensor Alarm for Kitchen Bathroom Basement
$18.99
  • ✽【NOTES】An Aqara Hub is required and sold separately. Requires a secured 2. 4 gigahertz WiFi network connection. The Aqara M2 or M1S Hub can connect up to 128 devices(*use of a repeater such as...
  • 【FLOOD DETECTION】Whenever the Aqara Water Leak Sensor detects water, it can send an alert to your phone and activate the local alarm on the Aqara Hub to prevent leaks and flooding.
We earn a commission if you make a purchase, at no additional cost to you.
03/09/2024 09:00 pm GMT
  1. Unbox your Aqara Water Leak Sensor.
  2. Open Home Assistant and navigate to Configuration > Integrations > Zigbee Home Automation.
  3. Click Configure and then + Add Device.
  4. Place the water leak sensor on a flat surface. Press the water icon on the top of the sensor & hold for 5-10 seconds.
  5. You should see the device flicker blue a few times. This puts the device in “pairing mode”.
  6. In Home Assistant, you should see it begin the initialization phase.

Note: I had to attempt the pairing process 2-3 times before it would detect in ZHA.

That’s it! You can now name your device and assign it to room within Home Assistant!

Aqara leak sensors have two entities: Battery Power and wet/dry status:


How To Add Aqara Door and Window Sensors to Home Assistant

Aqara Door and Window Sensor, REQUIRES AQARA HUB, Zigbee Connection, Wireless Mini Contact Sensor for Alarm System and Smart Home Automation, Compatible with Apple HomeKit, Alexa, Works With IFTTT
$14.99
  • ✽【NOTES】An Aqara Hub is required and sold separately. Requires a secured 2. 4 gigahertz WiFi network connection. The Aqara M2 or M1S Hub can connect up to 128 devices(*use of a repeater such as...
  • 【UNAUTHORIZED ENTRY DETECTION】Whenever the door/window opens unexpectedly, the Aqara Door and Window Sensor will send an alert notification to your phone and activate the local alarm on the Aqara...
We earn a commission if you make a purchase, at no additional cost to you.
03/09/2024 08:50 pm GMT
  1. Unbox your Aqara Door and Window Sensor.
  2. Open Home Assistant and navigate to Configuration > Integrations > Zigbee Home Automation.
  3. Click Configure and then + Add Device.
  4. The sensor will have two parts: a small and a large end. On the sides of both you’ll see a line. Place those two lines together
  5. Press the round button located on the top of the larger part of the sensor. Press and hold for about 5 seconds until you see the light flicker blue rapidly. This puts the device in “pairing mode”.
  6. In Home Assistant, you should see it begin the initialization phase.

Aqara Door and Window Sensors have two entities in Home Assistant: Battery Level and open/closed status.


How To Add Aqara Wireless Mini Switch to Home Assistant (button)

Aqara Wireless Mini Switch, Requires AQARA HUB, Zigbee Connection, Versatile 3-Way Control Button for Smart Home Devices, Compatible with Apple HomeKit, Works with IFTTT
$17.99
  • ✽【NOTES】An Aqara Hub is required and sold separately. Requires a secured 2. 4 gigahertz WiFi network connection. The Aqara M2 or M1S Hub can connect up to 128 devices(*use of a repeater such as...
  • 【ONE TOUCH CONTROL】A wireless versatile remote to control your smart home devices
We earn a commission if you make a purchase, at no additional cost to you.
03/09/2024 09:06 pm GMT
  1. Unbox your Aqara Wireless Mini Switch. Pull the blue tab.
  2. Open Home Assistant and navigate to Configuration > Integrations > Zigbee Home Automation.
  3. Click Configure and then + Add Device.
  4. Press the round button located on the top end of the button. (not the large button in the middle).
  5. Press and hold for about 5-10 seconds until you see the light flicker blue rapidly. This puts the device in “pairing mode”.
  6. In Home Assistant, you should see it begin the initialization phase.

You will only see 1 entity for Aqara mini switches: Battery Level. It will show up as unknown for the first several hours but should start reporting soon.

You will have to manually add automations for the various button clicks. As it stands, the button won’t do anything.

How To Configure Aqara Button Presses

Navigate to Configuration >Automations.

Choose the Button device. Under the Trigger section, you have several options:

  • Short button pressed
  • Long button pressed
  • Long Button released
  • Double pressed

Keep in mind, you will have to create 4 different automations for this button, one for each trigger.

For example, if you wanted to create an automation to toggle a lamp from a single short press, that can be created in 1 automation. You’d then have to create another for double press, long press, and long release.


How To Configure Aqara Motion Sensors

Aqara Temperature and Humidity Sensor, REQUIRES AQARA HUB, Zigbee, for Remote Monitoring and Home Automation, Wireless Thermometer Hygrometer, Compatible with Apple HomeKit, Alexa, Works with IFTTT
$19.99
  • ✽【NOTES】An Aqara Hub is required and sold separately. Requires a secured 2. 4 gigahertz WiFi network connection. The Aqara M2 or M1S Hub can connect up to 128 devices(*use of a repeater such as...
  • 【REMOTE MONITORING】When the room temperature reaches above or below a certain threshold, the Aqara Temperature and Humidity Sensor can send a push alert to your phone or trigger the Aqara Hub...
We earn a commission if you make a purchase, at no additional cost to you.
03/09/2024 08:54 pm GMT
  1. Unbox your Aqara Motion Sensor. Pull the blue tab.
  2. Open Home Assistant and navigate to Configuration > Integrations > Zigbee Home Automation.
  3. Click Configure and then + Add Device.
  4. If you’re looking at the front of the sensor, there is a small round button on the right side.
  5. Press and hold for about 5-10 seconds until you see the light flicker blue rapidly. This puts the device in “pairing mode”.
  6. In Home Assistant, you should see it begin the initialization phase.
  7. Give it a name and then add it to a room.

Aqara Motion Sensors have 4 entities available: Power, Illuminance, occupancy, and Zone.

Wrapping Up

Hopefully this guide helps you quickly Xioami Aqara devices to your Home Assistant setup in 2021!

These sensors are inexpensive, pair super easily, and work really well.


My Favorite Home Assistant Devices

Below are some of the Home Assistant-compatible devices I personally use in my home. I highly recommend each of them.

The full list of all Home Assistant compatible & recommended devices I use can be found on my Equipment List page.

Similar Posts

13 Comments

  1. Hey I just wanted to say that I’m using 100% the same hardware you are in this article, and this straight up does not work. Nor can I find a single other article anywhere online saying this should be this easy. Is there some trick that I and everyone else is missing?

    1. I’m not sure what to tell you, other than I use aqara devices all the time with Home Assistant. Are you using a Nortek GoControl dongle like I am or something else?

    2. Just got it to work on my end, I noticed I had to press the small button a couple of times after Home Assistant first detected the button and then it worked (after one failed attempt). It said something like “initializing” and was blue then after I pressed the button again a couple times it turned green/completed.

      1. Thanks for the tip, glad you got it working!

    3. I am fairly new to Aqara but so far my experience is you may have to try to pair over and over until it works. But one it is pair it works great.

  2. Good Article, I would like to integrate the Agara M2 Hub and Aqara water leak sensor into Synology Docker Home Assistant (HA). These are the only devices I have at the moment. To date, I can see both devices in HA, The M2 hub is regarded as a HomeKit controller and the Aqara leak sensor is regarded as a HomeKit device. The only problem I am seeing is the Agara M2 Hub has only “arm” and “disarm” entities. I cannot use the M2 Hub siren or push notification entities in automation. So as of time of writing, it is useless in HA

    Before I go out and buy a Zigbee stick to fulfill my automation requirements. Can you please advise me why you say in your requirements (*use of a repeater such as the Aqara Smart Plug or Aqara Smart Wall Switch (With Neutral)

    Why? The Agara Hub M2 supports Zigbee 3.

    1. I put that in my guide based on feedback combined from several forum/Reddit posts. From what I’ve read, some Aqara devices tend to lose connectivity unless a repeater is used to extend the zigbee coverage.

      1. Thank-you for reply. So, it’s due to intermittent connectivity issues and nothing to do with having the full suite of Agaro M2 hub entities available for you to use. Can you can you confirm if you have the Agara M2 Hub Speaker and Push Notification entities available to you in HA when using the Zigbee stick? Kind regards, RN

        1. I don’t use the Aqara hub; I paired my Aqara devices directly to Home Assistant, so I’m not sure if those entities would be available or not.

  3. KEITH L TERRILL says:

    I have tried multiple times, and I can not get the Zigbee Coordinator to see this Aqara Mini Switch. I hold the button down while the ZHA searches…. I never see any light on the button and the search eventually fails. I pulled the blue tab out so the battery should be active. I have sylvania bulbs installed, no problem. I am using the nortek husbzb-1.

    Question: is there a key press sequence to begin paring mode? or is it just hold it down? Or do I have to hold it in the up direction, or the center, or what?

    1. I had a hard time getting the button paired but eventually, it work. A few tips I’ve read and learned is that you don’t need to hold down the pair button. It seems to work better by just pushing it once.

  4. That Zigbee USB hub is over C$100 on Amazon. Is there a cheaper option?

    1. The GoControl one? In the US, I never see it go over $55.

Leave a Reply

Your email address will not be published. Required fields are marked *