# ActionsTrait.StateChanged

# ActionsTrait.StateChanged


```
interface ActionsTrait.StateChanged : ClusterStruct
```

<br />

Known direct subclasses [Actions.StateChangedEvent](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/Actions.StateChangedEvent)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/Actions.StateChangedEvent` |   |

*** ** * ** ***

The state of an action changed during execution of a command, and the most recent command using the `actionId` populated the `invokeId` attribute.

## Summary

| ### Public functions |
|---|---|
| `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/ActionsTrait.StateChanged#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/ActionsTrait.StateChanged#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. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.StateChanged#actionId()` |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.StateChanged#invokeId()` |
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.ActionStateEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/ActionsTrait.StateChanged#newState()` The state that the action has changed to. |

## Public functions

### getDescriptor

```
@HomeExperimentalGenericApi
open fun getDescriptor(): StructDescriptor
```

Returns the descriptor for the struct.

### getFieldValueById

```
@HomeExperimentalGenericApi
open fun getFieldValueById(tagId: UInt): Any?
```

Returns the value of the field for the given tag ID.

## Public properties

### actionId

```
val actionId: UShort?
```

### invokeId

```
val invokeId: UInt?
```

### newState

```
val newState: ActionsTrait.ActionStateEnum?
```

The state that the action has changed to.