---
title: HMCharacteristicWriteAction
framework: homekit
role: symbol
role_heading: Class
path: homekit/hmcharacteristicwriteaction
---

# HMCharacteristicWriteAction

An action in an action set that writes a value to a characteristic.

## Declaration

```swift
class HMCharacteristicWriteAction<TargetValueType> where TargetValueType : NSCopying
```

## Overview

Overview Action sets are instances of HMActionSet.

## Topics

### New Methods

- [init(characteristic:targetValue:)](homekit/hmcharacteristicwriteaction/init(characteristic:targetvalue:).md)
- [characteristic](homekit/hmcharacteristicwriteaction/characteristic.md)
- [targetValue](homekit/hmcharacteristicwriteaction/targetvalue.md)
- [updateTargetValue(_:completionHandler:)](homekit/hmcharacteristicwriteaction/updatetargetvalue(_:completionhandler:).md)

## Relationships

### Inherits From

- [HMAction](homekit/hmaction.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

### Defining the associated actions

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