Problem Description
The power-consumption data of electrical devices (e.g., smart plugs) is incorrect in xiaomi_home, while the same data is accurate in the Mi Home app or in other Home Assistant integrations that support the Profile protocol.
Reason
Many electrical devices report erroneous power-consumption values when accessed through the MIoT-Spec-V2 protocol, but return correct values when queried via the Profile protocol.
xiaomi_home only implements MIoT-Spec-V2 protocol, so the wrong data are displayed.
By contrast:
- The Mi Home device plug-in is developed and maintained by the manufacturer, which is free to mix the two protocols and therefore uses the Profile protocol for energy data.
- Other Home Assistant integrations that still support Profile protocol obtain the correct data for the same reason.
Known Failure Patterns
| Pattern ID |
Symptom |
| 1 |
Device never reports power consumption data. |
| 2 |
Device reports a constant value for power consumption. |
| 3 |
Device reports the 10-minute sliding-window energy instead of the total power consumption. |
| Device Model |
Failure Pattern |
| chuangmi.plug.212a01 |
3 |
| cuco.plug.v3 |
2 |
| iot.switch.padw2p |
2 |
| lumi.plug.v1 |
1 |
| xiaomi.aircondition.mt0 |
2 |
| zimi.plug.zncz01 |
2 |
Solution
The above issues originate in the device firmware and cannot be fixed by xiaomi_home.
If the instantaneous power reported by the device is accurate, you may create a Riemann-sum integration in Home Assistant to derive energy from power.
Limitation: the counter resets to zero after every Home Assistant restart.
Why xiaomi_home cannot fall back to the Profile protocol?
Since the official release of the MIoT-Spec-V2 protocol in 2021, newly connected devices on Xiaomi IoT platform can no longer opt to use the Profile protocol which is effectively obsolete.
xiaomi_home relies on the publish-subscribe MQTT broker which only pushes MIoT-Spec-V2 messages. The broker is unable to deliver messages that follow the Profile protocol.
Why Xiaomi does not enforce strict MIoT-Spec-V2 compliance?
During device certification, Xiaomi IoT platform only verifies that the product works properly inside Mi Home APP. It does not validate whether every function is implemented strictly according to the MIoT-Spec-V2 protocol. Forcing manufacturers to implement all standard details would raise the device integration barrier and discourage them from joining Xiaomi IoT platform. Consequently, this requirement is practically unenforceable.