Implement Roborock dock cleaning fluid status#161098
Implement Roborock dock cleaning fluid status#161098joostlek merged 8 commits intohome-assistant:devfrom
Conversation
There was a problem hiding this comment.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
|
Hey there @Lash-L, @allenporter, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
|
We're in the middle of adding a way to better check if certain status modes are supported, so that we only add entities when the device says they are supported without requiring status fetches on startup. I wonder if the |
There was a problem hiding this comment.
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
@allenporter Hmm yeah it seems like it should be, I'll give that a shot and see if it works as expected |
From what i can see that does seem to be a good indicator. I think we need to fully implement some of the more complex dock support to get a slightly better indicator, but that one is a great first pass. |
There was a problem hiding this comment.
Pull request overview
This PR adds support for detecting when cleaning fluid is empty or not installed on Roborock docks with automatic cleaning fluid dispensers (e.g., Saros Z70). The implementation adds a new binary sensor that only appears when the device supports the cleaning fluid delivery feature.
Changes:
- Adds conditional binary sensor for cleaning fluid status based on device feature support
- Implements feature detection mechanism using
feature_supportedcallable in entity descriptions - Extends test coverage to verify entity creation when feature is supported
- Adds appropriate translations and icons for the new sensor
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| homeassistant/components/roborock/binary_sensor.py | Adds new clean_fluid_empty sensor with feature detection support and filtering logic |
| homeassistant/components/roborock/strings.json | Adds translation key for the cleaning fluid sensor name |
| homeassistant/components/roborock/icons.json | Adds spray-bottle icon for the cleaning fluid sensor |
| tests/components/roborock/test_binary_sensor.py | Adds test to verify entity creation when cleaning fluid feature is supported |
| tests/components/roborock/mock_data.py | Adds clean_fluid_status field to mock device data |
| tests/components/roborock/conftest.py | Adds device_features trait mock with is_clean_fluid_delivery_supported flag |
| "name": "Water shortage" | ||
| }, | ||
| "clean_fluid_empty": { | ||
| "name": "Cleaning fluid" |
There was a problem hiding this comment.
The entity name "Cleaning fluid" is ambiguous for a binary sensor with device class PROBLEM. When the sensor is "on", it indicates a problem (empty/not installed), but the name doesn't clearly convey this. Consider renaming to "Cleaning fluid empty" to match the pattern used by the similar "Water shortage" sensor and make the problem state clear to users.
| "name": "Cleaning fluid" | |
| "name": "Cleaning fluid empty" |
There was a problem hiding this comment.
I think this is a good change
There was a problem hiding this comment.
I wasn't sure if we wanted to keep it more generic since this sensor can mean either cleaning fluid empty, or cleaning fluid container not installed 🤔
There was a problem hiding this comment.
Good point! You have convinced me! Can you include this in a docs pr as well?
There was a problem hiding this comment.
What does not installed mean? If the device doesn't have this, why do we provide this entity at all?
There was a problem hiding this comment.
Not installed as in physically. You can physically remove it and it will give this error or if it's empty it will give this error
This reverts commit 53d0e1f.
Lash-L
left a comment
There was a problem hiding this comment.
Looks good to me! Thank you!
joostlek
left a comment
There was a problem hiding this comment.
The prek checks are failing, can you take a look?
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Seems like it was just due to json ordering, updated it and verified that the prettier passes locally |
Proposed change
This PR adds a new binary sensor for detecting when the cleaning fluid is empty or not installed on Roborock docks. The automatic cleaning fluid dispenser is a feature on newer docks such as for the Saros Z70.
Testing
./script/run-in-env.sh pytest tests/components/roborock/test_binary_sensor.py -v --snapshot-updateOverwrote integration locally, verified that the cleaning fluid status showed up for my Saros Z70s, and did not show up for my QX Revo Ultra:

Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: