# OnOffTrait.OnOffControlBitmap

# OnOffTrait.OnOffControlBitmap


```
data class OnOffTrait.OnOffControlBitmap
```

<br />

*** ** * ** ***

Flags for cluster control.

## Summary

| ### Public constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OnOffTrait.OnOffControlBitmap#OnOffControlBitmap(kotlin.Boolean)(acceptOnlyWhenOn: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` Creates the OnOffControlBitmap 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/OnOffTrait.OnOffControlBitmap#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/OnOffTrait.OnOffControlBitmap#acceptOnlyWhenOn()` Indicates a command is only accepted when the `onOff` attribute is true. |

## Public constructors

### OnOffControlBitmap

```
OnOffControlBitmap(acceptOnlyWhenOn: Boolean = false)
```

Creates the OnOffControlBitmap data class.

## Public functions

### toRaw

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

Convert this ClusterBitmap to raw (bytes) format

## Public properties

### acceptOnlyWhenOn

```
val acceptOnlyWhenOn: Boolean
```

Indicates a command is only accepted when the `onOff` attribute is true.