---
title: serviceGroups
framework: homekit
role: symbol
role_heading: Instance Property
path: homekit/hmhome/servicegroups
---

# serviceGroups

An array of all service groups in the home.

## Declaration

```swift
var serviceGroups: [HMServiceGroup] { get }
```

## Discussion

Discussion Services groups are instances of HMServiceGroup.

## See Also

### Grouping services

- [servicesWithTypes(_:)](homekit/hmhome/serviceswithtypes(_:).md)
- [addServiceGroup(withName:completionHandler:)](homekit/hmhome/addservicegroup(withname:completionhandler:).md)
- [removeServiceGroup(_:completionHandler:)](homekit/hmhome/removeservicegroup(_:completionhandler:).md)
- [HMServiceGroup](homekit/hmservicegroup.md)
