<!--
{
  "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/HMAction",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HMAction"
  },
  "title" : "HMAction"
}
-->

# HMAction

An abstract base class for actions in HomeKit.

```
class HMAction
```

## Overview

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

## Topics

### Identifying an action

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

A unique identifier for the action.

### Initializers

[`-  init`](/documentation/HomeKit/HMAction/init())

### Type Methods

[`+  new`](/documentation/HomeKit/HMAction/new())

## See Also

  [HomeKit Developer Guide](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/HomeKitDeveloperGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40015050)

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

### Inherits From

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

### Inherited By

[`HMCharacteristicWriteAction`](/documentation/HomeKit/HMCharacteristicWriteAction)

---

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)