Skip to content

feat: add configurable room outlines - #51

Open
mysiki wants to merge 2 commits into
Python-roborock:mainfrom
mysiki:main
Open

mysiki wants to merge 2 commits into
Python-roborock:mainfrom
mysiki:main

Conversation

@mysiki

@mysiki mysiki commented Dec 1, 2026

Copy link
Copy Markdown

Summary
Adds configurable room-outline generation from the raw Roborock pixel map.

Changes
Generate polygon outlines for concave and multi-section rooms.
Add per-map outline modes:
Precise: simplified architectural contour.
Square: one bounding rectangle per room.
Add a dedicated outline select entity and options-flow setting.
Cache geometry by map payload and selected mode.
Refresh only affected map entities when the mode changes.
Add English and German translations.

Motivation
The previous room attributes only exposed a bounding box, causing L-shaped and multi-section rooms to appear as a single rectangle. Extracting outlines from the raw room matrix preserves the actual room structure while still allowing a simpler rectangular mode.

Validation
Added tests for rectangular, concave, disconnected, noisy, and malformed map data.
Python compilation and translation JSON validation pass.

Derive room polygons from the raw Roborock pixel matrix so the map card can represent concave and multi-rectangle rooms instead of always highlighting their bounding boxes.

Add per-map room outline modes: precise uses the cleaned architectural contour, while square uses one bounding rectangle. Expose the choice through the options flow and a dedicated select entity, cache geometry by map payload and mode, synchronize updates, and localize the UI. Refresh only affected maps when the setting changes.
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.

1 participant