How To Add Aqara Devices to Home Assistant in 2021

by Danny
0 comment

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
  • NOTES: Aqara Hub is required and sold separately. Requires a secured 2. 4 gigahertz WiFi network connection. One Aqara Hub can connect up to 32 Aqara devices.
  • 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.
  • HOME AUTOMATION: Controls and triggers Aqara connected devices when excess water is detected.
  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
  • NOTES: Aqara Hub is required and sold separately. Requires a secured 2. 4 gigahertz Wi-Fi network connection. One Aqara Hub can connect up to 32 Aqara devices.
  • 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 Hub.
  • HOME AUTOMATION: The Aqara Door and Window Sensor can control other Aqara connected devices as the status of the door or window changes.
  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
  • NOTES: This device requires the Aqara Hub to Work. REQUIRED a secured 2. 4 gigahertz Wi-Fi network connection. One Aqara Hub can connect up to 32 Aqara devices.
  • ONE TOUCH CONTROL: A wireless versatile remote to control your smart home devices
  • 3 CONTROL SETTINGS: Set single press, double press, and long press to control programmable functions, such as turning on/off a device, activating a scene, etc
  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 Connection, for Remote Monitoring and Smart Home Automation, Wireless Thermometer Hygrometer, Compatible with Apple HomeKit, Alexa
  • NOTES: Aqara Hub is required and sold separately. Requires a secured 2. 4 gigahertz WiFi network connection. One Aqara Hub can connect up to 32 Aqara devices.
  • 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 night light.
  • HOME AUTOMATION: The Aqara Temperature and Humidity Sensor can control other connected devices such as Aqara Smart Plug to ensure that your fan or humidifier maintains a constant level of comfort for you and your family.
  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.

You may also like

Leave a Comment