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
{{ message }}
Repository navigation
HomeTrait does not load map (LOAD_MULTI_MAP) when map_present == 0 on single-map devices #985
When a vacuum has a saved and selected map (current_map is valid in GET_STATUS, and GET_MULTI_MAPS_LIST returns the map), the device can still report map_present: 0 in GET_STATUS while idle/docked (meaning the map is not currently loaded in the vacuum's active memory).
When GET_MAP_V1 is called while map_present == 0:
The device returns an empty image block (width=0, height=0).
vacuum-map-parser-roborock / vacuum-map-parser-base renders the "NO MAP" placeholder image (map_data.image.is_empty == True).
Currently in roborock/devices/traits/v1/home.py:
HomeTrait._build_home_map_info() only calls await self._maps_trait.set_current_map(map_info.map_flag) (RoborockCommand.LOAD_MULTI_MAP) when len(sorted_map_infos) > 1:
formap_infoinsorted_map_infos:
# We need to load each map to get its room dataiflen(sorted_map_infos) >1:
...
awaitself._maps_trait.set_current_map(map_info.map_flag)
When a user only has a single saved map (multi_map_count: 1), set_current_map is skipped even when self._status_trait.map_present == 0, and the resulting "NO MAP" response is persisted into DeviceCache.
HomeTrait.refresh() also does not check self._status_trait.map_present == 0 to reload the current map via set_current_map() before fetching GET_MAP_V1.
Expected Behavior
During HomeTrait.discover_home() / _build_home_map_info() and HomeTrait.refresh(), if self._status_trait.map_present == 0 (and the device is not busy/cleaning/returning), HomeTrait should load the map via self._maps_trait.set_current_map(...) (handling RoborockInvalidStatus -> RoborockDeviceBusy and sleeping MAP_SLEEP) before refreshing map content.
Avoid caching empty placeholder maps (map_data.image.is_empty) in DeviceCache as valid discovered home map content.
Activity