---
title: "updateName(_:completionHandler:)"
framework: homekit
role: symbol
role_heading: Instance Method
path: "homekit/hmroom/updatename(_:completionhandler:)"
---

# updateName(_:completionHandler:)

Updates the name of the room.

## Declaration

```swift
func updateName(_ name: String, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func updateName(_ name: String) async throws
```

## Parameters

- `name`: The new name which must not be nil.
- `completion`: The block executed after the request is processed.

## See Also

### Identifying a room

- [name](homekit/hmroom/name.md)
- [uniqueIdentifier](homekit/hmroom/uniqueidentifier.md)
