---
title: "toggle(with:completion:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrbaseclusteronoff/toggle(with:completion:)"
---

# toggle(with:completion:)

## Declaration

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

```swift
func toggle(with params: MTROnOffClusterToggleParams?) async throws
```
