Add Roborock Q10 map image entity - #173883
Conversation
|
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
|
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR adds support for the Roborock Q10 (B01/ss07) push-driven vacuum device to the Home Assistant Roborock integration, bumping the python-roborock library from 4.1.0 to 5.15.0 and introducing new entities across multiple platforms.
Changes:
- Bumps
python-roborockfrom 4.1.0 to 5.15.0 and adds a newRoborockB01Q10UpdateCoordinatorthat receives push-driven trait updates from Q10 devices. - Introduces Q10-specific entity implementations for vacuum, switch, sensor, select, number, button, and image platforms, each interacting with the new trait-based API.
- Adds comprehensive tests and snapshot assertions covering the Q10 device entities and service interactions.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| homeassistant/components/roborock/coordinator.py | Adds generic type parameter to B01 base coordinator and new RoborockB01Q10UpdateCoordinator with push-driven trait listener support |
| homeassistant/components/roborock/vacuum.py | Adds Q10 state-to-activity mapping, RoborockQ10Vacuum entity with start/resume logic and send_command |
| homeassistant/components/roborock/switch.py | Adds Q10 switch descriptions and RoborockSwitchB01Q10 entity class |
| homeassistant/components/roborock/sensor.py | Adds Q10 sensor descriptions and RoborockSensorEntityB01Q10, filters existing B01 sensors to Q7 only |
| homeassistant/components/roborock/select.py | Adds Q10 select descriptions and RoborockSelectB01Q10 for clean mode/dust frequency |
| homeassistant/components/roborock/number.py | Adds RoborockNumberB01Q10 for volume control |
| homeassistant/components/roborock/button.py | Adds RoborockButtonB01Q10 for empty dustbin |
| homeassistant/components/roborock/image.py | Adds RoborockQ10Map with push-driven map updates |
| homeassistant/components/roborock/init.py | Adds Q10 coordinator instantiation in device setup |
| homeassistant/components/roborock/strings.json | Adds translation keys for Q10 entities |
| homeassistant/components/roborock/icons.json | Adds icon definitions for Q10 entities |
| homeassistant/components/roborock/manifest.json | Bumps python-roborock version |
| requirements_all.txt / requirements_test_all.txt | Bumps python-roborock version |
| tests/components/roborock/conftest.py | Renames name to raw_name for library API change |
| tests/components/roborock/test_q10.py | Adds comprehensive Q10 device tests |
| tests/components/roborock/snapshots/test_q10.ambr | Adds snapshot assertions for Q10 entities |
6c9df70 to
2a4ed4e
Compare
2a4ed4e to
44f415c
Compare
44f415c to
e33039d
Compare
|
I think it would be easier to review the code if we split each entity into a separate pull request (image, number, sensor). |
|
@lboue yes... waiting for the last PRs to merge on python-roborock before resuming/splitting this one |
The new version is here. |
efa7ae4 to
44e3c57
Compare
|
Hello - thank you so much for pushing this forward. Can we add one platform per PR? that way we can review quickly in small chunks and get these merged faster. Thank you! |
|
Splitting this into one-platform-per-PR as requested 👍 — this PR will be trimmed down to the image (map) platform; switch and number will follow as separate PRs shortly. |
fdd88aa to
a8ec8d2
Compare
d0962f3 to
c3d17d2
Compare
5f55416 to
a64c0a2
Compare
allenporter
left a comment
There was a problem hiding this comment.
Looks great, nice work.
Merge conflict has been resolved
Proposed change
Adds the map image entity for the Roborock Q10 (B01/ss07), continuing the existing Q10 support (vacuum, sensors, select, button, segment cleaning and switches are already merged). Split out to one platform per PR as requested in review; switch (#175731, merged) and number (#175732) are separate PRs.
The Q10 pushes its current map over MQTT — there is no request/response map API and the multi-map list is not reachable on this channel — so this is a single push-driven entity per device:
add_update_listener(unsubscribed viaasync_on_remove), picking up any map pushed before the entity was added.image_last_updated(and writes state) when the pushed PNG content actually changes, so no-op pushes don't touch the state machine.image/pngcontent type;DIAGNOSTICentity category andmap_{duid_slug}unique id, matching the V1 map entities' conventions.No dependency bump: this targets the already-pinned
python-roborockversion. (The upcoming map-layers release only changes rendering internals; the trait API consumed here is identical — verified by running this test suite against that branch as well.)Type of change
Additional information
Sibling per-platform PRs from the same split: #175731 (switch, merged), #175732 (number).
Testing: new test covers serving the initially pushed map, a no-op push not updating the entity, and a content-changing push updating both the image and
image_last_updated; image entity-count and naming assertions updated. Fulltests/components/roborocksuite passes locally (Python 3.14); ruff, mypy (strict) and hassfest clean.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: