# SwitchTrait.Feature


```
data class SwitchTrait.Feature
```

<br />

*** ** * ** ***

Switch cluster FeatureMap.

## Summary

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.Feature#Feature(kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean,kotlin.Boolean)( latchingSwitch: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html, momentarySwitch: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html, momentarySwitchRelease: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html, momentarySwitchLongPress: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html, momentarySwitchMultiPress: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html, actionSwitch: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html )` Creates the Feature data class. |

| ### Public functions |
|---|---|
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-long/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.Feature#toRaw()()` Convert this ClusterBitmap to raw (bytes) format |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.Feature#actionSwitch()` Indicates simplified handling of events for multi-press-capable switches. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.Feature#latchingSwitch()` The latching switch (such as a rocker) maintains its position after being pressed or turned. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.Feature#momentarySwitch()` The momentary switch (such as a push button) does not maintain its position after being pressed or turned. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.Feature#momentarySwitchLongPress()` The momentary switch (such as a push button) can distinguish and report long pressed from short presses. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.Feature#momentarySwitchMultiPress()` The momentary switch (such as a push button) can distinguish and report double press and potentially multiple presses with more events, such as a triple press. |
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/SwitchTrait.Feature#momentarySwitchRelease()` The momentary switch (such as a push button) can distinguish and report release events. |

## Public constructors

### Feature

```
Feature(
    latchingSwitch: Boolean = false,
    momentarySwitch: Boolean = false,
    momentarySwitchRelease: Boolean = false,
    momentarySwitchLongPress: Boolean = false,
    momentarySwitchMultiPress: Boolean = false,
    actionSwitch: Boolean = false
)
```

Creates the Feature data class.

## Public functions

### toRaw

```
open fun toRaw(): ULong
```

Convert this ClusterBitmap to raw (bytes) format

## Public properties

### actionSwitch

```
val actionSwitch: Boolean
```

Indicates simplified handling of events for multi-press-capable switches.

### latchingSwitch

```
val latchingSwitch: Boolean
```

The latching switch (such as a rocker) maintains its position after being pressed or turned.

### momentarySwitch

```
val momentarySwitch: Boolean
```

The momentary switch (such as a push button) does not maintain its position after being pressed or turned. After releasing, it goes back to its idle position.

### momentarySwitchLongPress

```
val momentarySwitchLongPress: Boolean
```

The momentary switch (such as a push button) can distinguish and report long pressed from short presses.

### momentarySwitchMultiPress

```
val momentarySwitchMultiPress: Boolean
```

The momentary switch (such as a push button) can distinguish and report double press and potentially multiple presses with more events, such as a triple press.

### momentarySwitchRelease

```
val momentarySwitchRelease: Boolean
```

The momentary switch (such as a push button) can distinguish and report release events.