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

# updateName(_:completionHandler:)

Updates the name of the home.

## 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. Must not already exist in the home.
- `completion`: The block executed after the request is processed.

## See Also

### Identifying a home

- [name](homekit/hmhome/name.md)
- [uniqueIdentifier](homekit/hmhome/uniqueidentifier.md)
- [isPrimary](homekit/hmhome/isprimary.md)
