Instance Method

addServiceGroupWithName:completionHandler:

Adds a service group to the home.

Declaration

- (void)addServiceGroupWithName:(NSString *)serviceGroupName completionHandler:(void (^)(HMServiceGroup *group, NSError *error))completion;

Parameters

serviceGroupName

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

completion

The block executed after the request is processed.

group

The newly created service group.

error

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

See Also

Grouping Services

- servicesWithTypes:

Returns an array of all services provided by accessories in the home that match the specified types.

serviceGroups

An array of all service groups in the home.

- removeServiceGroup:completionHandler:

Removes a service group from the home.

HMServiceGroup

A collection of accessory services.