---
title: "removeRoom(_:completionHandler:)"
framework: homekit
role: symbol
role_heading: Instance Method
path: "homekit/hmhome/removeroom(_:completionhandler:)"
---

# removeRoom(_:completionHandler:)

Removes a room from the home.

## Declaration

```swift
func removeRoom(_ room: HMRoom, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func removeRoom(_ room: HMRoom) async throws
```

## Parameters

- `room`: The room to remove.
- `completion`: The block executed after the request is processed.

## Discussion

Discussion If the room is in a zone, this method also removes it from the zone. Any accessories in the removed room automatically move to roomForEntireHome().

## See Also

### Dividing a house into rooms

- [rooms](homekit/hmhome/rooms.md)
- [roomForEntireHome()](homekit/hmhome/roomforentirehome().md)
- [addRoom(withName:completionHandler:)](homekit/hmhome/addroom(withname:completionhandler:).md)
- [HMRoom](homekit/hmroom.md)
