-
-
Notifications
You must be signed in to change notification settings - Fork 572
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Update dreamevacuum_miot.py with Xaiomi X10 #1924
base: master
Are you sure you want to change the base?
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use boolean instead.
@@ -480,6 +592,8 @@ class DreameVacuum(MiotDevice): | |||
"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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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+