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

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

## Declaration

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

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