Update dreamevacuum_miot.py with Xaiomi X10#1924
Update dreamevacuum_miot.py with Xaiomi X10#1924MaciekIzdebski wants to merge 7 commits intorytilahti:masterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1924 +/- ##
==========================================
- Coverage 81.41% 81.34% -0.07%
==========================================
Files 193 193
Lines 18636 18691 +55
Branches 4045 4056 +11
==========================================
+ Hits 15173 15205 +32
- Misses 3180 3201 +21
- Partials 283 285 +2 ☔ View full report in Codecov by Sentry. |
rytilahti
left a comment
There was a problem hiding this comment.
Hi and thanks for the PR @MaciekIzdebski! A couple of quick comments, btw, if you didn't already notice, most of the miot devices like this are also controllable directly using the genericmiot integration, i.e., miiocli genericmiot --ip <x> --token <x> status etc.
| class DustAutoCollect(FormattableEnum): | ||
| Off = 0 | ||
| On = 1 |
| "Device status: {result.device_status}\n" | ||
| "Filter left level: {result.filter_left_time}\n" | ||
| "Filter life level: {result.filter_life_level}\n" | ||
| "Sensor left level: {result.sensor_left_time}\n" |
There was a problem hiding this comment.
Please add descriptors to the status class(es) (@sensor, @setting, @action) so we can get rid of the manual output formatting altogether, and use the standardized interface for controls (i.e., miiocli commands like status, actions, settings, call and set).
This makes them visible for the cli and the future homeassistant integration (https://github.com/rytilahti/homeassistant-xiaomi-ng) when it's all done across the library.
Added support for Xaiomi/dreame Vaccum X10/X10+