Skip to content

Conversation

@Lash-L
Copy link
Collaborator

@Lash-L Lash-L commented Dec 6, 2025

Some clean up to make it easier to add selective support to the models as they use a different messaging strucutre

@Lash-L Lash-L requested review from allenporter and Copilot December 6, 2025 02:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the B01 device support to separate Q7 and Q10 logic into distinct submodules, preparing for different messaging structures for these model variants.

Key Changes:

  • Renamed RoborockB01Methods to RoborockB01Q7Methods to reflect Q7-specific implementation
  • Moved B01 properties API from b01/__init__.py to b01/q7/__init__.py as Q7PropertiesApi
  • Added device model detection logic in device_manager.py to route Q7 devices (model contains 'sc') to the appropriate trait implementation

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
roborock/roborock_typing.py Renamed enum class from RoborockB01Methods to RoborockB01Q7Methods for Q7-specific methods
roborock/protocols/b01_protocol.py Updated import to use renamed RoborockB01Q7Methods
roborock/devices/traits/traits_mixin.py Renamed property from b01_properties to b01_q7_properties
roborock/devices/traits/b01/q7/init.py Created new Q7-specific implementation with Q7PropertiesApi class
roborock/devices/traits/b01/q10/init.py Added placeholder file for future Q10 implementation
roborock/devices/traits/b01/init.py Refactored to import from q7 submodule instead of implementing directly
roborock/devices/device_manager.py Added conditional logic to route B01 devices to appropriate trait implementations based on model suffix
Comments suppressed due to low confidence (1)

roborock/devices/traits/b01/init.py:5

  • The name 'q&PropertiesApi' is exported by all but is not defined.
__all__ = ["q&PropertiesApi", "q7", "q10"]

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Lash-L and others added 4 commits December 5, 2025 21:04
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
allenporter
allenporter previously approved these changes Dec 6, 2025
Co-authored-by: Allen Porter <allen.porter@gmail.com>
@Lash-L
Copy link
Collaborator Author

Lash-L commented Dec 7, 2025

Waiting to merge this until after our current cycle

Edit: will merge when approved

@Lash-L Lash-L requested a review from allenporter December 10, 2025 02:28
@@ -0,0 +1,31 @@
"""Traits for Q7 B01 devices.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""Traits for Q7 B01 devices.
"""Traits for Q7 B01 devices.

@Lash-L Lash-L merged commit 9a1a360 into main Dec 12, 2025
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants