---
title: "addActionSet(_:completionHandler:)"
framework: homekit
role: symbol
role_heading: Instance Method
path: "homekit/hmtrigger/addactionset(_:completionhandler:)"
---

# addActionSet(_:completionHandler:)

Adds an action set to the trigger.

## Declaration

```swift
func addActionSet(_ actionSet: HMActionSet, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func addActionSet(_ actionSet: HMActionSet) async throws
```

## Parameters

- `actionSet`: The new action set.
- `completion`: The block executed after the request is processed.

## See Also

### Managing Action Sets

- [actionSets](homekit/hmtrigger/actionsets.md)
- [removeActionSet(_:completionHandler:)](homekit/hmtrigger/removeactionset(_:completionhandler:).md)
