explaingit

xiaomi/ha_xiaomi_home

21,654PythonAudience · vibe coderComplexity · 2/5Setup · 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
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

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

Xiaomi Home Integration is an official add-on for Home Assistant, a popular open-source platform that lets people control their smart-home devices from one place. This integration lets you connect Xiaomi smart devices, such as lights, sensors, and other gadgets registered to your Xiaomi account, into Home Assistant so they all sit alongside whatever else you already control there. You install it by either cloning it from GitHub, downloading through HACS (a community store for Home Assistant add-ons), or copying files manually using Samba or FTPS. Once installed, you sign in with your Xiaomi account using OAuth 2.0, which means your password is never stored locally, and you pick which home and devices to import. The integration supports multiple Xiaomi accounts at once, and devices from different accounts can share the same room. Communication happens through Xiaomi Cloud over MQTT, so device updates arrive in near real time without constant polling. A partial local-control mode is possible either through a Xiaomi central hub gateway (mainland China only) or by enabling a LAN control option for Wi-Fi and Ethernet devices. You would use this if you already run Home Assistant and want your Xiaomi smart-home gear visible there. It works in mainland China, Europe, India, Russia, Singapore, and the USA. Bluetooth, infrared, and virtual devices are not supported. It is written in Python.

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

← xiaomi on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.