---
title: "addHome(withName:completionHandler:)"
framework: homekit
role: symbol
role_heading: Instance Method
path: "homekit/hmhomemanager/addhome(withname:completionhandler:)"
---

# addHome(withName:completionHandler:)

Adds a new home to this home manager.

## Declaration

```swift
func addHome(withName homeName: String, completionHandler completion: @escaping @Sendable (HMHome?, (any Error)?) -> Void)
```

```swift
func addHome(named homeName: String) async throws -> HMHome
```

## Parameters

- `homeName`: The name of the new home. Must not match the name of an existing home.
- `completion`: The block executed after the request is processed.

## See Also

### Adding and removing homes

- [removeHome(_:completionHandler:)](homekit/hmhomemanager/removehome(_:completionhandler:).md)
