Skip to content

roborock: add Q7 map image entity and segment-clean handling#164439

Closed
arduano wants to merge 3 commits intohome-assistant:devfrom
arduano:molty/q7-segment-clean-alias
Closed

roborock: add Q7 map image entity and segment-clean handling#164439
arduano wants to merge 3 commits intohome-assistant:devfrom
arduano:molty/q7-segment-clean-alias

Conversation

@arduano
Copy link
Copy Markdown

@arduano arduano commented Feb 28, 2026

Summary

  • enable VacuumEntityFeature.CLEAN_AREA for RoborockQ7Vacuum
  • add async_clean_segments() for Q7 and normalize segment ids (e.g. "10", "1_10")
  • route send_command alias app_segment_clean to the Q7 segment-clean path
  • add B01/Q7 image entity (image.roborock_q7_current_map) using library map_content.refresh()
  • add/adjust roborock tests for segment-clean aliasing and Q7 image entity behavior

Dependency

Depends on python-roborock PR #774 for Q7 map_content support.

Testing

  • targeted py_compile checks for modified HA files passed in Python 3.14
  • full HA pytest execution is blocked in this host environment due package index / dependency constraints, so CI is expected to provide definitive runtime validation

@arduano arduano requested a review from allenporter as a code owner February 28, 2026 03:38
Copilot AI review requested due to automatic review settings February 28, 2026 03:38
Copy link
Copy Markdown

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

Hi @arduano

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!

@home-assistant
Copy link
Copy Markdown

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant
Copy link
Copy Markdown

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 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 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.

@arduano
Copy link
Copy Markdown
Author

arduano commented Feb 28, 2026

Hey, just a draft PR I'm scrapping together with my openclaw instance
Keeping it as draft mode until I truly test it and review it myself for real

This is for a Q7T+ that a family member recently purchased, and I was sad to find out that their purchase isn't compatible with my HASS so I decided to go fix it myself

Copy link
Copy Markdown
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 updates the Roborock integration to improve segment/room cleaning support for Q7 models by wiring Q7 devices into Home Assistant’s area-cleaning feature set and normalizing common “segment clean” command payloads.

Changes:

  • Add VacuumEntityFeature.CLEAN_AREA and a Q7-specific async_clean_segments implementation that normalizes segment identifiers to room IDs.
  • Route send_command payloads using the "app_segment_clean" alias into the Q7 segment-clean path.
  • Extend/adjust Roborock Q7 test fixtures and add new tests for the new behavior.

Reviewed changes

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

File Description
homeassistant/components/roborock/vacuum.py Enables CLEAN_AREA for Q7, adds segment-id normalization and alias routing in async_send_command.
tests/components/roborock/test_vacuum.py Adds Q7 tests for clean-area and alias routing; extends failure test coverage.
tests/components/roborock/conftest.py Extends Q7 trait mock with clean_segments.

Comment thread homeassistant/components/roborock/vacuum.py
Comment thread tests/components/roborock/test_vacuum.py Outdated
Comment thread tests/components/roborock/test_vacuum.py Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29d2f1a47e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread homeassistant/components/roborock/vacuum.py
Comment thread homeassistant/components/roborock/vacuum.py
@arduano arduano changed the title Improve Roborock Q7 segment cleaning command handling roborock: add Q7 map image entity and segment-clean handling Feb 28, 2026
Copy link
Copy Markdown

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

Hi @arduano

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!

Copy link
Copy Markdown

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

Hi @arduano

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!

@arduano
Copy link
Copy Markdown
Author

arduano commented Feb 28, 2026

Ignore this PR until this one's merged: Python-roborock/python-roborock#774

Copy link
Copy Markdown
Contributor

@allenporter allenporter left a comment

Choose a reason for hiding this comment

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

Appreciate the work to improve roborock. Initial high level thoughts:
(1) Please review https://developers.home-assistant.io/docs/core/entity/image/ for how to implement image entities properly.
(2) Image and segment handling should be separate PRs for separate features/platforms.

(I know you said to ignore the PR until the other is merged, but also want to get ahead of these fundamental things)

@joostlek
Copy link
Copy Markdown
Member

I will close this PR for now. I know there's more activity, but as this PR currently requires more work and things like the PR template is not filled in and the CLA is not signed, I think it's better to close it until the rest is ready.

Feel free to continue whenever you feel like picking this up again

@joostlek joostlek closed this Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants