Instance Method

removeRoom:completionHandler:

Removes a room from the home.

Declaration

- (void)removeRoom:(HMRoom *)room completionHandler:(void (^)(NSError *error))completion;

Parameters

room

The room to remove.

completion

The block executed after the request is processed.

error

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

Discussion

If the room is in a zone, this method also removes it from the zone. Any accessories in the removed room automatically move to roomForEntireHome.

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.

- addRoomWithName:completionHandler:

Creates a new room with the specified name.

HMRoom

The smallest subdivision of a home’s space.