<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMHomeManager/addHome(withName:completionHandler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMHomeManager(im)addHomeWithName:completionHandler:"
  },
  "title" : "addHome(withName:completionHandler:)"
}
-->

# addHome(withName:completionHandler:)

Adds a new home to this home manager.

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

## 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.

- home: The newly created home; may be `nil` if creation failed.
- error: `nil` on success; otherwise, error object indicating the reason for failure.

---

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)