---
title: "getTargetsWith(_:completion:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrbaseclusterenergyevse/gettargetswith(_:completion:)"
---

# getTargetsWith(_:completion:)

Command GetTargets

## Declaration

```swift
func getTargetsWith(_ params: MTREnergyEVSEClusterGetTargetsParams?, completion: @escaping @Sendable (MTREnergyEVSEClusterGetTargetsResponseParams?, (any Error)?) -> Void)
```

```swift
func targets(with params: MTREnergyEVSEClusterGetTargetsParams?) async throws -> MTREnergyEVSEClusterGetTargetsResponseParams
```

## Discussion

Discussion Allows a client to retrieve the current set of charging targets.
