---
title: "updateTargetValue(_:completionHandler:)"
framework: homekit
role: symbol
role_heading: Instance Method
path: "homekit/hmcharacteristicwriteaction/updatetargetvalue(_:completionhandler:)"
---

# updateTargetValue(_:completionHandler:)

Updates the target value.

## Declaration

```swift
func updateTargetValue(_ targetValue: TargetValueType, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func updateTargetValue(_ targetValue: TargetValueType) async throws
```

## Parameters

- `targetValue`: The new target value.
- `completion`: The block executed after the request is processed.

## See Also

### New Methods

- [init(characteristic:targetValue:)](homekit/hmcharacteristicwriteaction/init(characteristic:targetvalue:).md)
- [characteristic](homekit/hmcharacteristicwriteaction/characteristic.md)
- [targetValue](homekit/hmcharacteristicwriteaction/targetvalue.md)
