explaingit

al-one/hass-xiaomi-miot

5,863PythonAudience · generalComplexity · 2/5Setup · moderate

TLDR

A Home Assistant add-on that connects hundreds of Xiaomi smart home devices, plugs, robot vacuums, lights, air purifiers, to your Home Assistant dashboard using the Xiaomi MIoT protocol.

Mindmap

mindmap
  root((hass-xiaomi-miot))
    What it does
      Home Assistant addon
      Xiaomi device control
      MIoT protocol bridge
    Device Types
      Wi-Fi devices
      BLE Bluetooth
      ZigBee
    Setup Options
      Mi Account login
      Local IP and token
      HACS install
    Audience
      Smart home users
      Home Assistant users
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 Xiaomi smart home devices from a single Home Assistant dashboard instead of the Xiaomi app

USE CASE 2

Build automations that trigger your Xiaomi robot vacuum when you leave home using Home Assistant routines

USE CASE 3

Connect Xiaomi lights and sensors to Home Assistant over your local network without routing through the Xiaomi cloud

USE CASE 4

Import all your Xiaomi devices at once by signing in with a Mi Account instead of entering each device manually

Tech stack

PythonHome AssistantHACS

Getting it running

Difficulty · moderate Time to first run · 30min

Requires an existing Home Assistant installation with HACS already set up before this integration can be installed.

In plain English

This is a custom integration for Home Assistant (the open-source home automation platform) that brings Xiaomi smart home devices into the Home Assistant dashboard. It uses a Xiaomi protocol called MIoT-Spec, which describes the capabilities of Xiaomi hardware in a standardized way, to automatically discover and configure most Xiaomi devices without manual setup. The integration supports three categories of Xiaomi device: Wi-Fi connected devices, BLE (Bluetooth Low Energy) devices, and ZigBee devices. You can add all your devices at once by logging in with a Mi Account, or add individual devices by entering their local IP address and access token. For account-based setup, the integration can connect to each device either over your local network or through the Xiaomi cloud, depending on what the specific device supports. Installation is done through HACS (Home Assistant Community Store), the standard way to add third-party integrations to Home Assistant. Once installed, setup happens through Home Assistant's web interface without editing any configuration files. For users who want more control, the integration also supports YAML customization for individual devices, including options like forcing local-only connections, mapping custom sensor properties, reversing motor direction on blinds, and adjusting light transition speeds for Yeelights. The integration is available in English and Chinese, with a translation dictionary that can be extended by contributors. The README is written in both languages. The tool is designed to cover a broad range of Xiaomi products: smart plugs, air purifiers, robot vacuums, lights, cameras, air conditioners, washing machines, kettles, and more, all brought into a single Home Assistant interface that works independently of the Xiaomi app.

Copy-paste prompts

Prompt 1
How do I install hass-xiaomi-miot via HACS and log in with my Mi Account to import all my Xiaomi devices at once?
Prompt 2
Configure hass-xiaomi-miot to control my Xiaomi air purifier over the local network without going through Xiaomi's cloud
Prompt 3
Write a Home Assistant automation using hass-xiaomi-miot that turns on my Yeelight bulb when a motion sensor triggers
Prompt 4
How do I use YAML customization in hass-xiaomi-miot to reverse the motor direction on my Xiaomi smart blinds?
Open on GitHub → Explain another repo

← al-one on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.