mirror of
https://github.com/Lash-L/RoborockCustomMap.git
synced 2026-06-15 08:03:14 +02:00
0531b6d120
* 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>
10 lines
253 B
Python
10 lines
253 B
Python
"""Constants for Roborock Custom Map integration."""
|
|
|
|
DOMAIN = "roborock_custom_map"
|
|
|
|
CONF_MAP_ROTATION = "map_rotation"
|
|
DEFAULT_MAP_ROTATION = 0
|
|
MAP_ROTATION_OPTIONS = (0, 90, 180, 270)
|
|
|
|
SIGNAL_ROTATION_CHANGED = "roborock_custom_map_rotation_changed"
|