<!--
{
  "availability" : [
    "iOS: 16.1.0 -",
    "iPadOS: 16.1.0 -",
    "macCatalyst: -",
    "macOS: 14.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "MatterSupport",
  "identifier" : "/documentation/MatterSupport/MatterAddDeviceExtensionRequestHandler/rooms(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MatterSupport"
    ],
    "preciseIdentifier" : "s:13MatterSupport0A32AddDeviceExtensionRequestHandlerC5rooms2inSayAA0acdF0V4RoomVGAG4HomeVSg_tYaF"
  },
  "title" : "rooms(in:)"
}
-->

# rooms(in:)

Provides rooms that correspond to a home in the device setup.

```
func rooms(in home: MatterAddDeviceRequest.Home?) async -> [MatterAddDeviceRequest.Room]
```

## Return Value

The list of rooms to show. If only one room exists, no room card appears.

## Discussion

The system issues this request before presenting the “Select Room” card, and populates the picker with these options.

If the returned array contains two or more rooms, the user-interface flow displays a picker to allow selection of a room. If the object contains one room, that room is the selected room and the user-interface flow doesn’t display a picker. If the object contains no room, then the user-interface flow doesn’t display a picker, and any methods that take a room parameter receive `nil`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)