Skip to content

Add support for Xiaomi Smart Dehumidifier Lite (xiaomi.derh.lite)#2083

Open
bramkragten wants to merge 2 commits into
rytilahti:masterfrom
bramkragten:add-xiaomi-derh-lite
Open

Add support for Xiaomi Smart Dehumidifier Lite (xiaomi.derh.lite)#2083
bramkragten wants to merge 2 commits into
rytilahti:masterfrom
bramkragten:add-xiaomi-derh-lite

Conversation

@bramkragten

@bramkragten bramkragten commented Jul 15, 2026

Copy link
Copy Markdown

Summary

Adds a new MiotDevice implementation for the Xiaomi Smart Dehumidifier Lite (xiaomi.derh.lite), addressing #2059.

The device uses the MIoT protocol. The mapping follows the published spec (urn:miot-spec-v2:device:dehumidifier:0000A02D:xiaomi-lite:1) and every property has been verified against real hardware (firmware 1.0.3@BL602).

Supported functionality

  • Power on/off
  • Operation mode (Smart / Sleep / Clothes Drying)
  • Target humidity (40–70%)
  • Current relative humidity and temperature
  • Fault status (with a convenience tank_full property)
  • Buzzer
  • Indicator light (on/off + brightness: Off / Dim / Bright)
  • Child lock (physical controls locked)
  • Dry-after-off + remaining dry time + warming-up state
  • Delayed turn off (on/off, time, remaining time)

Notes

  • New device layout: miio/integrations/xiaomi/dehumidifier/.
  • Registration is automatic via _mappings; DeviceFactory.class_for_model("xiaomi.derh.lite") resolves to AirDehumidifierMiot.

Testing

  • Added tests/test_airdehumidifier_miot.py (status parsing + all setters + validation). All tests pass; ruff check/ruff format clean.
  • Verified against a real xiaomi.derh.lite: every mapped property returns code 0, status() parses correctly, and the write path (set_target_humidity) was confirmed. The Delay service (siid 8) is present on the device and is included.

Fixes #2059

Add a new MiotDevice implementation for the Xiaomi Smart Dehumidifier
Lite (xiaomi.derh.lite), covering power, operation mode, target
humidity, current humidity/temperature, buzzer, indicator light
(on/off + brightness), child lock and the dry-after-off feature, plus
fault reporting with a convenience tank-full property.

The MIoT mapping follows the published spec
(urn:miot-spec-v2:device:dehumidifier:0000A02D:xiaomi-lite:1). The
Delay service (siid 8) from the spec is intentionally omitted, since
the real device does not appear to expose it.

Fixes rytilahti#2059
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.08197% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.26%. Comparing base (2817647) to head (0246c06).

Files with missing lines Patch % Lines
...ations/xiaomi/dehumidifier/airdehumidifier_miot.py 91.48% 11 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2083      +/-   ##
==========================================
+ Coverage   84.13%   84.26%   +0.13%     
==========================================
  Files         199      202       +3     
  Lines       20164    20408     +244     
  Branches     1063     1065       +2     
==========================================
+ Hits        16964    17196     +232     
- Misses       3010     3021      +11     
- Partials      190      191       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Testing against a real xiaomi.derh.lite (firmware 1.0.3@BL602) shows the
Delay service (siid 8: delay, delay_time, delay_remain_time) responds with
code 0 for all properties, so it is part of the device after all. The
earlier omission was based on a community integration that simply did not
map it; the published spec was correct.

All mapped properties confirmed against real hardware via status().
@bramkragten
bramkragten marked this pull request as ready for review July 17, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Xiaomi Smart Dehumidifier Lite

1 participant