You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add per-map rotation support with select entity and calibrated overlays (#37)
* Add map rotation constants
Introduce rotation configuration constants for map image handling.
Adds rotation options (0, 90, 180, 270) and dispatcher signal name.
* Add per-map rotation select entity
Add SelectEntity to control map rotation per map_flag.
Rotation value is persisted via RestoreEntity and stored in hass.data.
Dispatcher signal notifies image entities when rotation changes.
* Enable rotation select platform and initialize storage
Register SELECT platform and initialize rotation storage in hass.data.
Add proper unload cleanup and reload behavior.
* Add backend map rotation with executor offloading
Implement backend image rotation using Pillow.
Rotation is applied in async_add_executor_job to avoid blocking the event loop.
Includes defensive validation and fallback handling.
* Add translations for rotation select entity
Add English and German translations for map rotation select entity.
Includes user-friendly labels for rotation options.
* Document map rotation select entity in README
Add documentation for the per-map rotation select entity.
Explains:
- How to rotate maps (0/90/180/270)
- Where to find the rotation select entity
- That calibration points are rotated as well
- That no reload is required
Also clarifies usage with Xiaomi Vacuum Map Card.
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Luke Lashley <conway220@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,26 @@ map_source:
26
26
calibration_source:
27
27
camera: true
28
28
```
29
+
### Map rotation (new)
30
+
31
+
If your map is displayed sideways or upside down, you can rotate the map directly in Home Assistant.
32
+
33
+
This integration provides a **Select entity per map** to control rotation:
34
+
- `select.<...>_rotation`
35
+
- Options: `0°`, `90°`, `180°`, `270°` (labels depend on your HA language)
36
+
37
+
This rotates **both**:
38
+
- the map image
39
+
- and the calibration points used by the Xiaomi Vacuum Map Card
40
+
(so rooms/zones and interactions stay aligned after rotation)
41
+
42
+
**How to use**
43
+
1. Go to **Settings → Devices & services → Roborock Custom Map**
44
+
2. Open the device/entities list
45
+
3. Find the `… rotation` select entity for your map and choose the correct rotation
46
+
47
+
No reload is required; the map updates immediately.
48
+
29
49
6. You can hit Edit on the card and then Generate Room Configs to allow for cleaning of rooms. It might generate extra keys, so check the yaml and make sure there are no extra 'predefined_sections'
0 commit comments