Instance Method

addRoomWithName:completionHandler:

Creates a new room with the specified name.

Declaration

- (void)addRoomWithName:(NSString *)roomName completionHandler:(void (^)(HMRoom *room, NSError *error))completion;

Parameters

roomName

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

completion

The block executed after the request is processed.

room

The newly created room.

error

nil on success; otherwise, error object indicating the reason for failure.

See Also

Dividing a House into Rooms

rooms

An array of the rooms in the home.

- roomForEntireHome

A room that represents all parts of the home that don’t have a more specific room to represent them.

- removeRoom:completionHandler:

Removes a room from the home.

HMRoom

The smallest subdivision of a home’s space.