explaingit

xiaomi/ha_xiaomi_home

21,654PythonAudience · vibe coderComplexity · 2/5MaintainedSetup · moderate

TLDR

Official Xiaomi integration for Home Assistant that lets you control Xiaomi smart home devices alongside other brands from one dashboard.

Mindmap

mindmap
  root((repo))
    What it does
      Connect Xiaomi devices
      Control from Home Assistant
      Create automations
      Monitor device status
    How it works
      Cloud control default
      Local control optional
      MIoT protocol
      Multiple accounts
    Setup
      Login with Xiaomi account
      Select homes and devices
      Import to Home Assistant
    Use cases
      Unified smart home control
      Cross-brand automations
      Single control panel
      Family device management

Things people build with this

USE CASE 1

Control all your Xiaomi smart home devices from Home Assistant instead of the Xiaomi app.

USE CASE 2

Create automations that combine Xiaomi devices with smart devices from other brands.

USE CASE 3

Manage multiple Xiaomi accounts and homes in one unified dashboard for your family.

Tech stack

PythonHome AssistantMIoT protocol

Getting it running

Difficulty · moderate Time to first run · 30min

Requires Home Assistant instance running and Xiaomi device credentials/pairing setup.

License could not be detected automatically. Check the repository's LICENSE file before use.

In plain English

This project is the official Xiaomi Home Integration for Home Assistant, published by Xiaomi itself. Home Assistant is a popular open-source platform that lets you control all the smart devices in your house, lights, plugs, thermostats, sensors, vacuum cleaners, from one dashboard and combine them with automations. Xiaomi sells a huge catalogue of smart-home gadgets that normally only talk to Xiaomi's own Mi Home app, and this integration is the bridge that makes those devices visible and controllable inside Home Assistant. In practical terms, you install the integration (by cloning the repository into your Home Assistant config folder, via HACS, or by copying the custom_components folder manually), then add "Xiaomi Home" from the Settings > Devices & services screen and sign in with your Xiaomi account using OAuth 2.0. After login, you pick which home and devices to import. The integration subscribes to Xiaomi's MIoT cloud over MQTT, so when a sensor changes or a button is pressed, Home Assistant is notified instantly without polling. Multiple Xiaomi accounts can be added side by side. A local-only mode is possible if you own a Xiaomi central hub gateway (mainland China only) or by enabling LAN control for IP-based devices. You would use this if you already own Xiaomi smart-home hardware and want it controlled from Home Assistant alongside other brands. The integration is written in Python, requires Home Assistant Core 2024.4.4 or newer, and supports most Xiaomi device categories except Bluetooth, infrared, and virtual devices. Available regions include mainland China, Europe, India, Russia, Singapore, and the USA. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
How do I install the Xiaomi Home integration in Home Assistant and connect my Xiaomi devices?
Prompt 2
Show me how to set up local control for my Xiaomi devices in Home Assistant using a gateway.
Prompt 3
How can I create an automation in Home Assistant that triggers a Xiaomi device based on another brand's sensor?
Prompt 4
What Xiaomi devices are supported by this Home Assistant integration and how do I check compatibility?
Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.