---
title: "requestConstraintBasedForecast(with:completion:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrbaseclusterdeviceenergymanagement/requestconstraintbasedforecast(with:completion:)"
---

# requestConstraintBasedForecast(with:completion:)

Command RequestConstraintBasedForecast

## Declaration

```swift
func requestConstraintBasedForecast(with params: MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams, completion: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func requestConstraintBasedForecast(with params: MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams) async throws
```

## Discussion

Discussion Allows a client to ask the ESA to recompute its Forecast based on power and time constraints.
