# SwitchTrait.MultiPressComplete


```
interface SwitchTrait.MultiPressComplete : ClusterStruct
```

<br />

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

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/Switch.MultiPressCompleteEvent` |   |

*** ** * ** ***

Indicates how many times the momentary switch has been pressed in a multi-press sequence.

## 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/SwitchTrait.MultiPressComplete#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/SwitchTrait.MultiPressComplete#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-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.MultiPressComplete#previousPosition()` The value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.Attributes#currentPosition()` attribute just prior to the release. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.MultiPressComplete#totalNumberOfPressesCounted()` Valid values are: - `1` when there was one press, and the sequence has ended - in other words, it was not a multiple-press, - `2` when there were exactly two presses in a multi-press sequence, and the sequence has ended, - `3` when there were exactly three presses in a multi-press sequence, and the sequence has ended, - `n` when there were exactly *n* presses in a multi-press sequence, and the sequence has ended. <br /> |

## 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

### previousPosition

```
val previousPosition: UByte?
```

The value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.Attributes#currentPosition()` attribute just prior to the release.

### totalNumberOfPressesCounted

```
val totalNumberOfPressesCounted: UByte?
```

Valid values are:

- `1` when there was one press, and the sequence has ended - in other words, it was not a multiple-press,
- `2` when there were exactly two presses in a multi-press sequence, and the sequence has ended,
- `3` when there were exactly three presses in a multi-press sequence, and the sequence has ended,
- `n` when there were exactly *n* presses in a multi-press sequence, and the sequence has ended.

<br />