Contents

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 -> HMZone

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.

See Also

Grouping rooms into zones