Refactor room name retrieval in image.py

This commit is contained in:
Luke Lashley
2025-12-05 16:57:24 -05:00
committed by GitHub
parent 3e9149be0a
commit 83013ab729
@@ -115,11 +115,11 @@ class RoborockMap(RoborockCoordinatedEntityV1, ImageEntity):
return {}
if map_data.rooms is not None:
for room in map_data.rooms.values():
name = map_data.rooms.get(room.number)
name = self._home_trait._rooms_trait.room_map.get(room.number)
room.name = name.name if name else "Unknown"
calibration = map_data.calibration()
return {
"calibration_points": map_data.calibration(),
"calibration_points": calibration,
"rooms": map_data.rooms,
"zones": map_data.zones,
}