# SwitchTrait.MultiPressOngoing

# SwitchTrait.MultiPressOngoing


```
interface SwitchTrait.MultiPressOngoing : ClusterStruct
```

<br />

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

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

*** ** * ** ***

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.MultiPressOngoing#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.MultiPressOngoing#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.MultiPressOngoing#currentNumberOfPressesCounted()` Valid values are: - `2` when the second press of a multi-press sequence has been detected, - `3` when the third press of a multi-press sequence has been detected, - `n` when the *n* th press of a multi-press sequence has been detected. <br /> |
| `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.MultiPressOngoing#newPosition()` The value of the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.Attributes#currentPosition()` attribute after the press. |

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

### currentNumberOfPressesCounted

```
val currentNumberOfPressesCounted: UByte?
```

Valid values are:

- `2` when the second press of a multi-press sequence has been detected,
- `3` when the third press of a multi-press sequence has been detected,
- `n` when the *n*th press of a multi-press sequence has been detected.

<br />

### newPosition

```
val newPosition: UByte?
```

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