---
title: "moveToLevelWithOnOff(with:expectedValues:expectedValueInterval:completionHandler:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrclusterlevelcontrol/movetolevelwithonoff(with:expectedvalues:expectedvalueinterval:completionhandler:)"
---

# moveToLevelWithOnOff(with:expectedValues:expectedValueInterval:completionHandler:)

## Declaration

```swift
func moveToLevelWithOnOff(with params: MTRLevelControlClusterMoveToLevelWithOnOffParams, expectedValues expectedDataValueDictionaries: [[String : Any]]?, expectedValueInterval expectedValueIntervalMs: NSNumber?, completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func moveToLevelWithOnOff(with params: MTRLevelControlClusterMoveToLevelWithOnOffParams, expectedValues expectedDataValueDictionaries: [[String : Any]]?, expectedValueInterval expectedValueIntervalMs: NSNumber?) async throws
```
