-
-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the Xiaomi/Viomi Dishwasher (viomi.dishwasher.m02) #877
Add support for the Xiaomi/Viomi Dishwasher (viomi.dishwasher.m02) #877
Conversation
I'm not sure how I can fix these two Windows test failures as I don't think it has anything to do with my changes. Feedback appreciated. |
The windows tests are failing sometimes and can be ignored here. |
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.
Great work on the PR! 🥇 I restarted the windows build and it went fine, it's flaky sometimes as syssi mentioned.
I did a brief initial review, to summarize:
- Prefer booleans instead of enums for boolean values.
- Add docstrings to public functions, examples for data payloads.
- Log unknown responses so users can report/debug it.
- Please also update the README.md.
- Update discovery mapping if the device is discoverable via mdns.
On the flattening of the requests, I haven't given a thought on that for now, but if the same issue affects other devices (maybe a buggy sdk version?) we should deal with it in Device
class. Otherwise, overriding send
could work as a stopgap solution.
@syssi do you have any devices that only support max_properties=1
to try out if flattening would allow querying multiple properties on those?
I would like to test the |
Ohh, it wasn't a PR but an issue: #875 . |
Sorry all! Was a bit of a busy week here. Will try to push the changes to address the feedback this weekend. |
Supported commands - Power on/off. - Start/stop/pause/continue a program. - Schedule a program for a specific time (and cancel it). - Retrieve current status + errors of the dishwasher. - Child lock enable/disable. - Set air refresh interval. fix rytilahti#874
- Updated README - Added docstrings to all publics properties and methods. - Logging of unknown values. - Removed DoorStatus and PowerStatus in favor of bools. - Log events and return the actual value from .send(). - Updated tests (removed unused Program check as this is an internal action by the Dishwasher) - time_left is now returned as timedelta in seconds. - Various typing optmizations. - Multiple status properties now use bools instead of Enums. Signed-off-by: Daan van Gorkum <djvg@djvg.net>
dab1f83
to
d6c44ee
Compare
Codecov Report
@@ Coverage Diff @@
## master #877 +/- ##
==========================================
- Coverage 82.05% 81.95% -0.11%
==========================================
Files 149 149
Lines 14458 14594 +136
Branches 3511 3550 +39
==========================================
+ Hits 11864 11960 +96
- Misses 2361 2387 +26
- Partials 233 247 +14
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Thanks for the PR @TheDJVG and sorry for the delay, hope this can still be useful for someone even when you don't have the device anymore 👍
Supported commands
fix #874