---
title: "changeToMode(with:completion:)"
framework: matter
role: symbol
role_heading: Instance Method
path: "matter/mtrbaseclusterenergyevsemode/changetomode(with:completion:)"
---

# changeToMode(with:completion:)

Command ChangeToMode

## Declaration

```swift
func changeToMode(with params: MTREnergyEVSEModeClusterChangeToModeParams, completion: @escaping @Sendable (MTREnergyEVSEModeClusterChangeToModeResponseParams?, (any Error)?) -> Void)
```

```swift
func changeToMode(with params: MTREnergyEVSEModeClusterChangeToModeParams) async throws -> MTREnergyEVSEModeClusterChangeToModeResponseParams
```

## Discussion

Discussion This command is used to change device modes.
