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

# changeToMode(with:completion:)

Command ChangeToMode

## Declaration

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

```swift
func changeToMode(with params: MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams) async throws -> MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams
```

## Discussion

Discussion This command is used to change device modes.
