Class

HMZone

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

Declaration

@interface HMZone : NSObject

Overview

An HMZone instance is an optional grouping of rooms in a home, with names like “upstairs” and “downstairs”. Zones are optional—rooms don’t need to be in a zone. By adding rooms to a zone, the user can give commands to Siri like “Siri, turn on all of the lights downstairs.” A single room can be in multiple zones—for example, “kitchen” might be in both the “downstairs” and “entertainment area” zones.

You create new zones using the addZoneWithName:completionHandler: method of HMHome. A zone can’t span homes—that is, you can’t create a zone that includes rooms from more than one home.

Topics

Identifying a Zone

name

The name of the zone.

- updateName:completionHandler:

Updates the name of the zone.

uniqueIdentifier

The unique identifier for a zone.

Assigning Rooms to a Zone

rooms

Array of rooms in the zone.

- addRoom:completionHandler:

Adds a room to the zone.

- removeRoom:completionHandler:

Removes a room from the zone.

Relationships

Inherits From

See Also

Grouping Rooms into Zones

zones

An array of all the zones in the home.

- addZoneWithName:completionHandler:

Adds a new zone to the home.

- removeZone:completionHandler:

Removes a zone from the home.