diff --git a/roborock/version_1_apis/roborock_client_v1.py b/roborock/version_1_apis/roborock_client_v1.py index 14f8861..1910f6c 100644 --- a/roborock/version_1_apis/roborock_client_v1.py +++ b/roborock/version_1_apis/roborock_client_v1.py @@ -277,6 +277,8 @@ async def get_room_mapping(self) -> list[RoomMapping] | None: """Gets the mapping from segment id -> iot id. Only works on local api.""" mapping: list = await self.send_command(RoborockCommand.GET_ROOM_MAPPING) if isinstance(mapping, list): + if not isinstance(mapping[0], list) and len(mapping) == 2: + return [RoomMapping(segment_id=mapping[0], iot_id=mapping[1])] return [ RoomMapping(segment_id=segment_id, iot_id=iot_id) # type: ignore for segment_id, iot_id in [unpack_list(room, 2) for room in mapping if isinstance(room, list)]