<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMServiceGroup",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMServiceGroup"
  },
  "title" : "HMServiceGroup"
}
-->

# HMServiceGroup

A collection of accessory services.

```
class HMServiceGroup
```

## Overview

A service group makes it easier to address the services as a single entity. For example, a user might choose to group a set of lights together as “Desk Lamps,” and have another set of lights grouped as “Ceiling Lights”. You create service groups using the [`addServiceGroup(withName:completionHandler:)`](/documentation/HomeKit/HMHome/addServiceGroup(withName:completionHandler:)) method of [`HMHome`](/documentation/HomeKit/HMHome). Service groups are visible to Siri and allow users to control a group of services through Siri.

## Topics

### Managing Service Groups

[`name`](/documentation/HomeKit/HMServiceGroup/name)

The name of the service group.

[`uniqueIdentifier`](/documentation/HomeKit/HMServiceGroup/uniqueIdentifier)

The unique identifier for the service group.

[`-  updateName:completionHandler:`](/documentation/HomeKit/HMServiceGroup/updateName(_:completionHandler:))

Updates the name of the service group.

[`services`](/documentation/HomeKit/HMServiceGroup/services)

Array of the services in the service group.

[`-  addService:completionHandler:`](/documentation/HomeKit/HMServiceGroup/addService(_:completionHandler:))

Adds a new service to the service group.

[`-  removeService:completionHandler:`](/documentation/HomeKit/HMServiceGroup/removeService(_:completionHandler:))

Removes a service from the service group.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)