Instance Method

addZone(withName:completionHandler:)

Adds a new zone to the home.

Declaration

func addZone(withName zoneName: String, completionHandler completion: @escaping (HMZone?, 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.

See Also

Grouping Rooms into Zones

var zones: [HMZone]

An array of all the zones in the home.

class HMZone

A collection of rooms that users think of as a single area, like upstairs or downstairs.