# OperationalState


```
@Generated(value = ["GoogleHomePlatformCodegen"])
interface OperationalState : OperationalStateTrait.Attributes, MatterTrait, OperationalStateCommands
```

<br />

*** ** * ** ***

API for the OperationalState trait. This trait supports remote monitoring and allows the operational state of any device to be changed provided that a state machine is part of the operation.

## Summary

| ### Nested types |
|---|
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState.Attribute : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this trait's attributes. |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState.Command : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html` Descriptor enum for this trait's commands. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState.OperationCompletionEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.OperationCompletion` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState.OperationCompletionEvent.EventFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this event's fields. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState.OperationalErrorEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.OperationalError` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState.OperationalErrorEvent.EventFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this event's fields. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState#supports(com.google.home.matter.standard.OperationalState.Attribute)(attribute: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState.Attribute)` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState#supports(com.google.home.matter.standard.OperationalState.Command)(command: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState.Command)` |

| ### Public properties |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/TraitFactory<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalState#factory()` |

### Inherited functions

From [com.google.home.matter.standard.OperationalStateCommands](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands) `suspend https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.PauseCommand.Response` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands#pause()()`

Pause the device if possible, based on the current operation underway.
`https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.PauseCommand.Response>` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands#pauseBatchable()()`

The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands#pause()` command.
`suspend https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.ResumeCommand.Response` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands#resume()()`

Resume operation if the device is in a state where it can be resumed.
`https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.ResumeCommand.Response>` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands#resumeBatchable()()`

The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands#resume()` command.
`suspend https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.StartCommand.Response` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands#start()()`

Start the device if the device is in a state where it can be started.
`https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.StartCommand.Response>` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands#startBatchable()()`

The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands#start()` command.
`suspend https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.StopCommand.Response` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands#stop()()`

Stop the device if possible, based on the current operation underway.
`https://developers.home.google.com/reference/kotlin/com/google/home/BatchableCommand<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.StopCommand.Response>` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands#stopBatchable()()`

The batchable version of `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateCommands#stop()` command.
From [com.google.home.matter.standard.OperationalStateTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes) `open https://developers.home.google.com/reference/kotlin/com/google/home/StructDescriptor` `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi
https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#getDescriptor()()`

Returns the descriptor for the struct.
`open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html?` `@https://developers.home.google.com/reference/kotlin/com/google/home/annotation/HomeExperimentalGenericApi
https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#getFieldValueById(kotlin.UInt)(tagId: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html)`

Returns the value of the field for the given tag ID.
From [com.google.home.TraitStateInvalidation](https://developers.home.google.com/reference/kotlin/com/google/home/TraitStateInvalidation) `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` `https://developers.home.google.com/reference/kotlin/com/google/home/TraitStateInvalidation#forceRead()()`

### Inherited properties

From [com.google.home.matter.standard.OperationalStateTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes) `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#acceptedCommandList()`

A list of client-generated commands which are supported by this cluster server instance.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#attributeList()`

A list of the attribute IDs of the attributes supported by the cluster instance.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#clusterRevision()`

The revision of the server cluster specification supported by the cluster instance.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#countdownTime()`

The estimated time, in seconds, before the operation completes.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#currentPhase()`

The current phase of operation being performed by the server.
`https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Feature` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#featureMap()`

Whether the server supports zero or more optional cluster features.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#generatedCommandList()`

A list of server-generated commands (server to client) which are supported by this cluster server instance.
`https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.ErrorStateStruct?` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#operationalError()`

The details of any current error condition being experienced by the device when the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#operationalState()` attribute is Error.
`https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.OperationalStateEnum?` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#operationalState()`

The current operational state of the device.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.OperationalStateStruct>?` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#operationalStateList()`

The set of possible operational states that the device exposes.
`https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html>?` `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OperationalStateTrait.Attributes#phaseList()`

The set of phases that the device can go through for the selected function or mode.
From [com.google.home.Trait](https://developers.home.google.com/reference/kotlin/com/google/home/Trait) `https://developers.home.google.com/reference/kotlin/com/google/home/Trait.TraitMetadata` `https://developers.home.google.com/reference/kotlin/com/google/home/Trait#metadata()`

## Public functions

### supports

```
fun supports(attribute: OperationalState.Attribute): Boolean
```

### supports

```
fun supports(command: OperationalState.Command): Boolean
```

## Public properties

### factory

```
open val factory: TraitFactory<OperationalState>
```