Skip to content

Conversation

@pauloruberto
Copy link
Contributor

This PR adds support for tracking the cleaning fluid container status in the Roborock integration. The main changes introduce a new enum for cleaning fluid status, update the container logic to use this enum, and ensure the feature is only reported if supported by the device.

This was tested using the Saros Z70, which has a cleaning fluid dispenser. Also a Qrevo Curv and QX Revo Ultra which do not have cleaning fluid dispensers.

Copilot AI review requested due to automatic review settings December 6, 2025 15:39
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 adds support for tracking the cleaning fluid container status in the Roborock integration by introducing a new CleanFluidStatus enum and updating the clean_fluid_status property to use it.

  • Introduces CleanFluidStatus enum with values for empty/not installed and okay states
  • Updates the clean_fluid_status property to return the enum type and handle unsupported devices
  • Implements feature detection by returning None when the device doesn't support the cleaning fluid feature

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
roborock/data/v1/v1_code_mappings.py Adds CleanFluidStatus enum with empty_not_installed and okay states
roborock/data/v1/v1_containers.py Updates clean_fluid_status property to use the new enum type and adds feature detection logic

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

@pauloruberto pauloruberto force-pushed the cleaning-fluid-mappings branch from 0c02b26 to a195c42 Compare December 7, 2025 16:17
@pauloruberto pauloruberto changed the title Add mappings for cleaning fluid states. feat: Add mappings for cleaning fluid states. Dec 7, 2025
@pauloruberto
Copy link
Contributor Author

Added "feat: " prefix to commit message to fix failing workflow step.

@Lash-L
Copy link
Collaborator

Lash-L commented Dec 7, 2025

Thank you! I'll double check the logic and will merge this. We're in a bit of sprint right now working on reliability. But as soon as we get over that, i'll be merging in some non-reliability based things like this.

@pauloruberto pauloruberto force-pushed the cleaning-fluid-mappings branch from a195c42 to ad5b7f4 Compare December 7, 2025 16:22
@pauloruberto
Copy link
Contributor Author

pauloruberto commented Dec 7, 2025

No worries! I'm aware of the ongoing issue right now and appreciate the support you guys are putting into the fix 😄

@Lash-L
Copy link
Collaborator

Lash-L commented Dec 8, 2025

Hi @pauloruberto can you do me a favor and check the response of the Status object?

This code would work:

    web_api = RoborockApiClient("email@gmail.com")
    await web_api.request_code_v4()
    code = input()
    ud = await web_api.code_login_v4(code)
    device_manager = await create_device_manager(UserParams("email@gmail.com", ud))
    await device_manager.get_devices()
    devices = await device_manager.get_devices()
    device = devices[0]
    await device.v1_properties.status.refresh()

And modify RoborockBase.from_dict()

to contain this:

            if (field_type := field_types.get(key)) is None:
                _LOGGER.debug(
                    "Key '%s' (decamelized: '%s') not found in %s fields, skipping",
                    orig_key,
                    key,
                    cls.__name__,
                )
                continue

right after

        for orig_key, value in data.items():
            key = _decamelize(orig_key)

And let me know if 'switch_status' exists as a key?

Alternatively you can use a debugger if you would rather.

@pauloruberto
Copy link
Contributor Author

Hey @Lash-L! I made a small script and executed it with the above, and I'm not seeing any switch_status anywhere in the debug logs (I do see some other Keys not found though, so change is working)

@Lash-L
Copy link
Collaborator

Lash-L commented Dec 10, 2025

hmm odd. Thanks for checking @pauloruberto!

Copy link
Collaborator

@Lash-L Lash-L left a comment

Choose a reason for hiding this comment

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

Checked reversed engineered code - seems accurate.

@Lash-L Lash-L merged commit 32c717e into Python-roborock:main Dec 10, 2025
7 checks passed
@pauloruberto pauloruberto deleted the cleaning-fluid-mappings branch December 10, 2025 02:57
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.

2 participants