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

# addZone(withName:completionHandler:)

Adds a new zone to the home.

```
func addZone(withName zoneName: String, completionHandler completion: @escaping @Sendable (HMZone?, (any Error)?) -> Void)
```

## Parameters

`zoneName`

The name of the new zone. Must not be `nil`, and must not be the name of a zone already in the home.

`completion`

The block executed after the request is processed.

- zone: The newly created zone.
- 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)