---
title: HMAction
framework: homekit
role: symbol
role_heading: Class
path: homekit/hmaction
---

# HMAction

An abstract base class for actions in HomeKit.

## Declaration

```swift
class HMAction
```

## Overview

Overview Actions can be added to HMActionSet objects. Action sets can then be set for automatic execution in response to specific conditions using HMTrigger objects, or manually triggered with executeActionSet(_:completionHandler:).

## Topics

### Identifying an action

- [uniqueIdentifier](homekit/hmaction/uniqueidentifier.md)

### Initializers

- [init()](homekit/hmaction/init().md)

### Type Methods

- [new()](homekit/hmaction/new().md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Inherited By

- [HMCharacteristicWriteAction](homekit/hmcharacteristicwriteaction.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Related Documentation

- [HomeKit Developer Guide](apple-archive/documentation/NetworkingInternet/Conceptual/HomeKitDeveloperGuide/Introduction.md)

### Defining the associated actions

- [actions](homekit/hmactionset/actions.md)
- [addAction(_:completionHandler:)](homekit/hmactionset/addaction(_:completionhandler:).md)
- [removeAction(_:completionHandler:)](homekit/hmactionset/removeaction(_:completionhandler:).md)
- [HMCharacteristicWriteAction](homekit/hmcharacteristicwriteaction.md)
