To integrate Xiaomi devices into Home Assistant (HA), the most mainstream and most usable solution today is to install the Xiaomi Miot Auto integration through HACS.
Xiaomi Miot and Xiaomi Cloud (usually referring to the official integration or integrations that retrieve information through the cloud) are fundamentally different from each other.
Below is a detailed comparison and tutorial.
Part 1: The differences between the two
1. Xiaomi Miot Auto (recommended)
This is a third-party plugin developed by the Chinese developer al-one, and it is currently the most powerful and most universal solution for integrating Xiaomi devices.
- Principle: based on Xiaomi’s latest MIoT protocol (Xiaomi Internet of Things protocol).
- Advantages:
- Extremely broad device support: it supports almost all devices connected to the Mi Home app (including devices behind Bluetooth Mesh gateways).
- Local control: as long as the device is on the same LAN, it tries local LAN control first (fast response, works when the internet is down) and only falls back to the cloud when local control is not possible.
- Full features: it can read all kinds of device attributes (such as battery level, temperature and humidity, detailed status).
Disadvantage: it requires installing HACS (Home Assistant Community Store).
2. Xiaomi Miio (official integration) / Xiaomi Cloud
HA ships with an official Xiaomi Miio integration, which users sometimes loosely call the Xiaomi Cloud integration.
- Principle: based on the older Miio protocol.
- Advantages: built into the system, no need to install HACS, high stability.
- Disadvantages:
- Fewer supported devices: it mainly supports robot vacuums, air purifiers and older gateways. Support for newer plugs, switches and sensors is very poor.
- Cumbersome configuration: you often need to manually extract the device Token before you can integrate it.
Conclusion: just pick it without hesitation. It is the ultimate solution today.
Part 2: Detailed installation tutorial (Xiaomi Miot Auto) prerequisites
- Your Home Assistant is installed and running.
- HACS must be installed. If you have not installed HACS yet, search for “Home Assistant install HACS” and complete that step first (this is an unavoidable rite of passage in HA).
- You need a Xiaomi account, and the devices must already have been added to the Mi Home app on your phone.
Step 1: Download the integration in HACS
- Open HACS in the left-hand menu bar of Home Assistant.
- Click Integrations.
- Click Explore & Download Repositories in the bottom right corner.
- In the search box, enter: Xiaomi Miot Auto.
- Click Xiaomi Miot Auto in the search results.
- Click Download in the bottom right corner.
- After the download completes, you must restart Home Assistant (Settings -> System -> power button in the top right -> Restart Home Assistant).
Step 2: Add the integration and log in
- After restarting, click Settings in the left-hand menu bar.
- Click Devices & Services.
- Click + Add Integration in the bottom right corner (+ ADD INTEGRATION).
- In the search box, enter Xiaomi Miot and click the Xiaomi Miot Auto icon that appears.
- Choose the configuration method:
- You will see several options; choose the first one, Add devices using Mi Account. This is the simplest way, and it automatically pulls your device list from the cloud.
Enter the account information:
- Username: your Xiaomi account (phone number or ID).
- Password: your Xiaomi account password.
- Server: choose CN (Mainland China) — unless your Mi Home app region is set to another country.
- Click Submit.
Step 3: Filter devices (optional)
After a successful login, the integration lists all devices under your Mi Home account.
- Exclude devices: if there are devices you do not want to bring into HA, you can tick them here.
- Filter devices: usually just keep the default (Include all devices).
- Connection mode:
- Automatic is recommended.
- Explanation: it automatically detects whether the device is on the LAN. If it is, it uses local control (instant response); if it is not (for example a Bluetooth device or one on a different Wi-Fi), it uses cloud control.
Click Submit.
Step 4: Finish and use
- After clicking finish, you will see Xiaomi Miot Auto in the Devices & Services list.
- Click it and you will see “XX devices”. Click through to see your lamps, plugs, sensors and so on.
- Suggestions:
- Click a device to view its Entities.
- You can add these entities to your HA dashboard (Lovelace) to control them.
Part 3: FAQ and advanced tips
1. About local control (Local) vs cloud control (Cloud)
How to tell? On the device page in HA, click the device and look at its attributes. If you see sub_type or the connection mode shown as local, it is local control.
Why does it matter? Local control does not depend on the internet, responds extremely fast, and protects your privacy.
Note
: to achieve local control, your HA host and the Xiaomi device must be on the same LAN (the same subnet). If you have a complex VLAN setup, you may need to enable cross-subnet mDNS broadcast.
2. Bluetooth devices (temperature and humidity sensors, door locks)
Bluetooth devices do not connect to Wi-Fi themselves; they connect to the Mi Home cloud through a Bluetooth gateway.
Xiaomi Miot Auto usually integrates these devices through the cloud (because HA cannot connect directly to Bluetooth devices over Wi-Fi).
Advanced approach
: if you want to integrate Bluetooth devices locally, you need to buy a Bluetooth receiver that supports flashing ESPHome, or use the Bluetooth built into the HA host together with the Passive BLE Monitor integration (that is another topic). But for beginners, reading temperature and humidity through the cloud with Xiaomi Miot Auto is already good enough.
3. Device entity names are garbled or too long
- After integration, the entity ID may be very long (for example switch.xiaomi_plug_v3_xxxx).
- It is recommended to click the specific entity on the Devices page, click the gear icon in the top right, and change the Entity ID and name so it is easier to reference later in automations.
Summary
Do not agonise over the differences; just install Xiaomi Miot Auto through HACS and choose the account login mode. This is currently the most reliable and simplest turnkey solution for integrating the whole Xiaomi ecosystem.