addZone(withName:completionHandler:)
Adds a new zone to the home.
Declaration
func addZone(withName zoneName: String, completionHandler completion: @escaping @Sendable (HMZone?, (any Error)?) -> Void)func addZone(named zoneName: String) async throws -> HMZoneParameters
- 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
nilon success; otherwise, error object indicating the reason for failure.