Skip to content

Add Roborock Q10 map image entity - #173883

Merged
allenporter merged 1 commit into
home-assistant:devfrom
tubededentifrice:roborock-q10-support
Jul 7, 2026
Merged

Add Roborock Q10 map image entity#173883
allenporter merged 1 commit into
home-assistant:devfrom
tubededentifrice:roborock-q10-support

Conversation

@tubededentifrice

@tubededentifrice tubededentifrice commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

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:

  • Subscribes to the map trait's add_update_listener (unsubscribed via async_on_remove), picking up any map pushed before the entity was added.
  • Only bumps image_last_updated (and writes state) when the pushed PNG content actually changes, so no-op pushes don't touch the state machine.
  • image/png content type; DIAGNOSTIC entity category and map_{duid_slug} unique id, matching the V1 map entities' conventions.

No dependency bump: this targets the already-pinned python-roborock version. (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

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

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. Full tests/components/roborock suite passes locally (Python 3.14); ruff, mypy (strict) and hassfest clean.

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.
  • Any generated code has been carefully reviewed for correctness and compliance with project standards.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies a diff between library versions and ideally a link to the changelog/release notes is added to the PR description.

To help with the load of incoming pull requests:

Copilot AI review requested due to automatic review settings June 15, 2026 12:44

@home-assistant home-assistant Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

There is a merge conflict.

@home-assistant home-assistant Bot added cla-signed has-tests integration: roborock new-feature Top 100 Integration is ranked within the top 100 by usage Top 200 Integration is ranked within the top 200 by usage labels Jun 15, 2026
@home-assistant

Copy link
Copy Markdown
Contributor

Hey there @Lash-L, @allenporter, mind taking a look at this pull request as it has been labeled with an integration (roborock) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of roborock can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant mark-draft Mark the pull request as draft.
  • @home-assistant ready-for-review Remove the draft status from the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign roborock Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant update-branch Update the pull request branch with the base branch.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) on the pull request.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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-roborock from 4.1.0 to 5.15.0 and adds a new RoborockB01Q10UpdateCoordinator that 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

Comment thread homeassistant/components/roborock/image.py Outdated
Comment thread tests/components/roborock/test_q10.py Outdated
@tubededentifrice tubededentifrice changed the title Add Roborock Q10 (B01/ss07) support Add Roborock Q10 switch, number and image entities Jun 15, 2026
Copilot AI review requested due to automatic review settings June 15, 2026 13:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Comment thread tests/components/roborock/test_switch.py Outdated
Copilot AI review requested due to automatic review settings June 15, 2026 14:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread homeassistant/components/roborock/image.py Outdated
Comment thread homeassistant/components/roborock/sensor.py Outdated
@lboue

lboue commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

I think it would be easier to review the code if we split each entity into a separate pull request (image, number, sensor).

@tubededentifrice

Copy link
Copy Markdown
Contributor Author

@lboue yes... waiting for the last PRs to merge on python-roborock before resuming/splitting this one

@lboue

lboue commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

@lboue yes... waiting for the last PRs to merge on python-roborock before resuming/splitting this one

The new version is here.
https://github.com/Python-roborock/python-roborock/releases/tag/v5.22.0

@tubededentifrice
tubededentifrice marked this pull request as ready for review July 5, 2026 17:24
Copilot AI review requested due to automatic review settings July 5, 2026 17:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

@allenporter

Copy link
Copy Markdown
Contributor

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!

@allenporter
allenporter marked this pull request as draft July 5, 2026 18:46
@tubededentifrice

Copy link
Copy Markdown
Contributor Author

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.

Copilot AI review requested due to automatic review settings July 6, 2026 04:56
@tubededentifrice tubededentifrice changed the title Add Roborock Q10 switch, number and image entities Add Roborock Q10 map image entity Jul 6, 2026
@tubededentifrice

Copy link
Copy Markdown
Contributor Author

Done — this PR is now the image (map) platform only, rebased on latest dev. The other platforms are split out as requested: switch in #175731, number in #175732. The three are independent of each other (the later-merged ones may need a trivial conftest rebase).

@tubededentifrice
tubededentifrice marked this pull request as ready for review July 6, 2026 04:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Copilot AI review requested due to automatic review settings July 6, 2026 05:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Copilot AI review requested due to automatic review settings July 7, 2026 14:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/roborock/image.py
Copilot AI review requested due to automatic review settings July 7, 2026 17:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread homeassistant/components/roborock/image.py

@allenporter allenporter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great, nice work.

@allenporter
allenporter dismissed home-assistant[bot]’s stale review July 7, 2026 22:44

Merge conflict has been resolved

@allenporter
allenporter merged commit 676f18c into home-assistant:dev Jul 7, 2026
33 checks passed
@tubededentifrice
tubededentifrice deleted the roborock-q10-support branch July 8, 2026 15:08
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed has-tests integration: roborock new-feature Quality Scale: silver Top 100 Integration is ranked within the top 100 by usage Top 200 Integration is ranked within the top 200 by usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants