Smart Home OccupancySensing Trait Schema
action.devices.traits.OccupancySensing
- This trait belongs to devices that can detect occupancy, whether through PIR, ultrasonic, or physical contact sensing.
Device ATTRIBUTES
Devices with this trait may report the following
attributes as part of the SYNC
operation. To learn
more about handling SYNC
intents, see
Intent fulfillment.
Attributes | Type | Description |
---|---|---|
occupancySensorConfiguration |
Array |
A list of objects, each containing the sensor type and its associated delays and event threshold. |
[item, ...] |
Object |
A sensor type and its associated delays and event threshold, if applicable. |
occupancySensorType |
String |
Required. Supported values:
|
occupiedToUnoccupiedDelaySec |
Integer |
Represents the time delay, in seconds, before the reported occupancy changes to an unoccupied state after the last detected event. |
unoccupiedToOccupiedDelaySec |
Integer |
Represents the time delay, in seconds, before the reported occupancy changes to an occupied state after the last detected event. Required if |
unoccupiedToOccupiedEventThreshold |
Integer |
Specifies the number of detection events that must occur in the |
Examples
Occupancy sensor which supports PIR and ultrasonic sensing.
{ "occupancySensorConfiguration": [ { "occupancySensorType": "PIR", "occupiedToUnoccupiedDelaySec": 10, "unoccupiedToOccupiedDelaySec": 10, "unoccupiedToOccupiedEventThreshold": 2 }, { "occupancySensorType": "ULTRASONIC", "occupiedToUnoccupiedDelaySec": 10, "unoccupiedToOccupiedDelaySec": 10, "unoccupiedToOccupiedEventThreshold": 2 } ] }
Device STATES
Entities with this trait may report the following
states as part of the QUERY
operation. To learn
more about handling QUERY
intents, see
Intent fulfillment.
States | Type | Description |
---|---|---|
occupancy |
String |
Required. Indicates whether the device senses occupancy. Supported values:
|
Examples
Does the sensor detect occupancy in the office?
{ "occupancy": "OCCUPIED" }
Device COMMANDS
None.