# OccupancySensingTrait.OccupancyChanged


```
interface OccupancySensingTrait.OccupancyChanged : ClusterStruct
```

<br />

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

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensing.OccupancyChangedEvent` |   |

*** ** * ** ***

Generated when the occupancy status changes.

## 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/OccupancySensingTrait.OccupancyChanged#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/OccupancySensingTrait.OccupancyChanged#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://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.OccupancyBitmap?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.OccupancyChanged#occupancy()` The new occupancy state. |

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

### occupancy

```
val occupancy: OccupancySensingTrait.OccupancyBitmap?
```

The new occupancy state.