Instance Method

addServiceGroup(withName:completionHandler:)

Adds a service group to the home.

Declaration

func addServiceGroup(withName serviceGroupName: String, completionHandler completion: @escaping (HMServiceGroup?, Error?) -> Void)

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

func servicesWithTypes([String]) -> [HMService]?

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

var serviceGroups: [HMServiceGroup]

An array of all service groups in the home.

class HMServiceGroup

A collection of accessory services.