Skip to content
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

Improve viomi.vacuum.v8 (styj02ym) support #1559

Merged
merged 8 commits into from
Nov 23, 2022
Merged

Conversation

rytilahti
Copy link
Owner

@rytilahti rytilahti commented Oct 24, 2022

Breaking change: the naming of properties and methods have been adjusted to be more clear about their intention, enums with boolean values have been replaced with booleans.

This PR improves support for viomi vacuums and aims to make it available for homeassistant without custom components (like https://github.com/KrzysztofHajdamowicz/home-assistant-vacuum-styj02ym). While this has been developed against "Mi Robot Vacuum-Mop P" (viomi.vacuum.v8, styj02ym), it should work on all other viomivacuum supported vacuums. Thanks to @KrzysztofHajdamowicz for providing access to a test device :-)

This is related to #1495 and requires using https://github.com/rytilahti/home-assistant/tree/xiaomi_miio/feat/entities_from_upstream for the time being. The screenshot below shows the current (WIP) state.

image

Closes #1161
Closes #750
Closes #1003

TODO:

  • Consolidate common vacuum API (e.g., states need to be standardized for homeassistant to make it compatible with the vacuum platform)
  • Sensor/setting/switch icons and other metadata
  • Add actions
  • [-] Add buttons (reset consumables, ..)

Some notes:

  • The class previously requested properties unknown for this model, causing the mismatch in the number of elements requested vs. reported.
  • The device seems to be rather unresponsive for requests in many cases, this needs some investigation.

@codecov-commenter
Copy link

codecov-commenter commented Oct 24, 2022

Codecov Report

Merging #1559 (40a9d35) into master (086bc8c) will decrease coverage by 0.06%.
The diff coverage is 64.77%.

@@            Coverage Diff             @@
##           master    #1559      +/-   ##
==========================================
- Coverage   80.88%   80.81%   -0.07%     
==========================================
  Files         157      157              
  Lines       15338    15405      +67     
  Branches     3350     3419      +69     
==========================================
+ Hits        12406    12450      +44     
- Misses       2676     2699      +23     
  Partials      256      256              
Impacted Files Coverage Δ
miio/integrations/vacuum/viomi/viomivacuum.py 59.13% <64.77%> (+1.06%) ⬆️
miio/integrations/vacuum/roborock/vacuum_enums.py 100.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rytilahti rytilahti force-pushed the feat/viomi_improvements branch from 89795d1 to 40a9d35 Compare November 23, 2022 14:14
@rytilahti rytilahti marked this pull request as ready for review November 23, 2022 14:22
@rytilahti
Copy link
Owner Author

I'll merge this now to make it simpler to test & develop against the master branch.

@rytilahti rytilahti merged commit 76870d3 into master Nov 23, 2022
@rytilahti rytilahti deleted the feat/viomi_improvements branch November 23, 2022 14:26
@skarcha
Copy link

skarcha commented Jan 28, 2023

Can't wait to see this working on my Home Assistant. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants