Skip to content

Commit 27221b9

Browse files
authored
chore: Update current_rooms to return empty list instead of None
Change return type of current_rooms property to avoid returning None.
1 parent 532f108 commit 27221b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

roborock/devices/traits/v1/home.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ def current_map_data(self) -> CombinedMapInfo | None:
222222
return self._home_map_info.get(current_map_flag)
223223

224224
@property
225-
def current_rooms(self) -> list[NamedRoomMapping] | None:
225+
def current_rooms(self) -> list[NamedRoomMapping]:
226226
"""Returns the room names for the current map."""
227227
if self.current_map_data is None:
228-
return None
228+
return []
229229
return self.current_map_data.rooms
230230

231231
@property

0 commit comments

Comments
 (0)