Skip to content

Commit 83013ab

Browse files
authored
Refactor room name retrieval in image.py
1 parent 3e9149b commit 83013ab

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • custom_components/roborock_custom_map

custom_components/roborock_custom_map/image.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ def extra_state_attributes(self):
115115
return {}
116116
if map_data.rooms is not None:
117117
for room in map_data.rooms.values():
118-
name = map_data.rooms.get(room.number)
118+
name = self._home_trait._rooms_trait.room_map.get(room.number)
119119
room.name = name.name if name else "Unknown"
120-
120+
calibration = map_data.calibration()
121121
return {
122-
"calibration_points": map_data.calibration(),
122+
"calibration_points": calibration,
123123
"rooms": map_data.rooms,
124124
"zones": map_data.zones,
125125
}

0 commit comments

Comments
 (0)