Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2098 +/- ##
==========================================
+ Coverage 84.31% 84.52% +0.20%
==========================================
Files 201 204 +3
Lines 20656 20915 +259
Branches 1121 1134 +13
==========================================
+ Hits 17417 17678 +261
+ Misses 3047 3045 -2
Partials 192 192 ☔ View full report in Codecov by Harness. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add local support for
xiaomi.airp.mc6through a separateAirPurifierMC6implementation. The MC6 uses Auto=0, Sleep=3 and Favorite=5 and different property IDs from the existing purifier models.Includes power, modes, Favorite/fan levels, screen/brightness, buzzer, child lock, ionizer, UV, environmental/filter readings and target/actual motor speed. Exports the class and exposes it through
miiocli airpurifiermc6with status descriptors. Unknown modes and failed optional properties remain unavailable; failed power reads raise DeviceException.Fixes #2097.
Evidence
pytest -q miioreports 1550 passed, 7 skipped, 1 xfailed and 43 subtests passed. All pre-commit checks pass, including mypy.status()call on the device: all 21 mapped properties returned values.Specification: https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-purifier:0000A007:xiaomi-mc6:1:0000D050
Merge Danger
Door: Two-way.
Blast Radius: MC6 only. Existing purifier implementations and dependencies are unchanged. Polling is read-only. Undocumented units, debug writes and action buttons are omitted from this initial support; measured RPMs are not hardcoded as universal per-level settings.
Prepared with AI assistance and device-owner testing. No credentials, device IDs or private addresses are included.