# OccupancySensing


```
@Generated(value = ["GoogleHomePlatformCodegen"])
interface OccupancySensing : OccupancySensingTrait.Attributes, MatterTrait, Updatable
```

<br />

*** ** * ** ***

API for the OccupancySensing trait. This trait provides an interface to occupancy sensing functionality.

## Summary

| ### Nested types |
|---|
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensing.Attribute : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this trait's attributes. |
| `class https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensing.OccupancyChangedEvent : https://developers.home.google.com/reference/kotlin/com/google/home/Event, https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.OccupancyChanged` |
| `enum https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensing.OccupancyChangedEvent.EventFields : https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html, https://developers.home.google.com/reference/kotlin/com/google/home/Field` Descriptor enum for this event's fields. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensing#supports(com.google.home.matter.standard.OccupancySensing.Attribute)(attribute: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensing.Attribute)` |

| ### Public properties |
|---|---|
| `open https://developers.home.google.com/reference/kotlin/com/google/home/TraitFactory<https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensing>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensing#factory()` |

| ### Inherited functions |
|---|
| From [com.google.home.matter.standard.OccupancySensingTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes) |---|---| | `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.Attributes#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.Attributes#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. | |
| From [com.google.home.TraitStateInvalidation](https://developers.home.google.com/reference/kotlin/com/google/home/TraitStateInvalidation) |---|---| | `suspend https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/TraitStateInvalidation#forceRead()()` | |
| From [com.google.home.Updatable](https://developers.home.google.com/reference/kotlin/com/google/home/Updatable) |---|---| | `suspend https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensing` | `https://developers.home.google.com/reference/kotlin/com/google/home/Updatable#update(kotlin.Function1,kotlin.Function1)(optimisticReturn: (https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensing) -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html, init: https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.MutableAttributes.() -> https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)` Creates a mutable copy of an object and calls the given function to mutate it, then saves it and returns a new immutable copy with the updated state. | |

| ### Inherited properties |
|---|
| From [com.google.home.matter.standard.OccupancySensingTrait.Attributes](https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes) |---|---| | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#acceptedCommandList()` A list of client-generated commands which are supported by this cluster server instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#attributeList()` A list of the attribute IDs of the attributes supported by the cluster instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#clusterRevision()` The revision of the server cluster specification supported by the cluster instance. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Feature` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#featureMap()` Whether the server supports zero or more optional cluster features. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-int/index.html>` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#generatedCommandList()` A list of server-generated commands (server to client) which are supported by this cluster server instance. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#holdTime()` The time delay, in seconds, before the sensor changes to its unoccupied state after the last detection of occupancy. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.HoldTimeLimitsStruct?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#holdTimeLimits()` The server's limits and default value for the holdTime attribute. | | `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.Attributes#occupancy()` The sensed (processed) status of occupancy. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.OccupancySensorTypeEnum?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#occupancySensorType()` The type of occupancy sensor. | | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.OccupancySensorTypeBitmap?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#occupancySensorTypeBitmap()` The active occupancy sensor type. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#physicalContactOccupiedToUnoccupiedDelay()` The time delay in seconds before the physical contact occupancy sensor switches to its unoccupied state after detecting an unoccupied event. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#physicalContactUnoccupiedToOccupiedDelay()` The time delay in seconds before the physical contact occupancy sensor switches to its occupied state after detecting an occupied event. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#physicalContactUnoccupiedToOccupiedThreshold()` The number of movement detection events required during the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#physicalContactUnoccupiedToOccupiedDelay()` period before the PIR sensor transitions to its occupied state. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#pirOccupiedToUnoccupiedDelay()` The time delay in seconds before the PIR sensor changes to its unoccupied state after detecting movement in the sensed area. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#pirUnoccupiedToOccupiedDelay()` The time delay in seconds before the PIR sensor changes to its occupied state after detecting movement in the sensed area. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#pirUnoccupiedToOccupiedThreshold()` The number of movement detection events that must occur within the PirUnoccupiedToOccupiedDelay period before the PIR sensor transitions to its occupied state. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#ultrasonicOccupiedToUnoccupiedDelay()` The time delay in seconds before the ultrasonic sensor changes to its unoccupied state after detecting movement in the sensed area. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-short/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#ultrasonicUnoccupiedToOccupiedDelay()` The time delay in seconds before the Ultrasonic sensor changes to its occupied state after detecting movement in the sensed area. | | `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-u-byte/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#ultrasonicUnoccupiedToOccupiedThreshold()` The number of movement detection events required during the `https://developers.home.google.com/reference/kotlin/com/google/home/matter/standard/OccupancySensingTrait.Attributes#ultrasonicUnoccupiedToOccupiedDelay()` period before the ultrasonic sensor transitions to its occupied state. | |
| From [com.google.home.Trait](https://developers.home.google.com/reference/kotlin/com/google/home/Trait) |---|---| | `https://developers.home.google.com/reference/kotlin/com/google/home/Trait.TraitMetadata` | `https://developers.home.google.com/reference/kotlin/com/google/home/Trait#metadata()` | |

## Public functions

### supports

```
fun supports(attribute: OccupancySensing.Attribute): Boolean
```

## Public properties

### factory

```
open val factory: TraitFactory<OccupancySensing>
```