Smart Home ObjectDetection Trait Schema
action.devices.traits.ObjectDetection - This trait belongs to devices that can detect objects or people and send a notification to the user. By default, all ObjectDetection notifications are announced on smart displays and speakers with Google Assistant after a doorbell ring chime.
Device ATTRIBUTES
None.
Device STATES
None.
Device COMMANDS
None.
Device NOTIFICATIONS
Devices with this trait may return the following notification payload as part of a device state change. To learn more about implementing notifications, see Notifications for smart home Actions.
| Fields | Type | Description |
|---|---|---|
ObjectDetection |
Object |
Required. Notification payload. |
priority |
Integer |
Required. Represents the notification level. The currently supported value is 0, which indicates that the notification should be spoken aloud. |
detectionTimestamp |
Integer |
Required. The epoch timestamp in milliseconds at which the object was detected. |
objects |
Object |
Required. Collection of the objects detected by category. |
named |
Array |
List of objects recognized by the user that have been tagged with a label. |
[item, ...] |
String |
Object label. Requires at least 1 item. |
familiar |
Integer |
Count of objects recognized by the user that have no label. |
unfamiliar |
Integer |
Count of objects detected by the device that the user may not recognize. |
unclassified |
Integer |
Count of objects detected that the device was unable to classify. |
Examples
Detected two unknown objects on January 1, 2000.
{
"ObjectDetection": {
"objects": {
"unclassified": 2
},
"priority": 0,
"detectionTimestamp": 946684800000
}
}Detected someone you know on January 1, 2000.
{
"ObjectDetection": {
"objects": {
"familiar": 1
},
"priority": 0,
"detectionTimestamp": 946684800000
}
}Detected Alice on January 1, 2000.
{
"ObjectDetection": {
"objects": {
"named": [
"Alice"
]
},
"priority": 0,
"detectionTimestamp": 946684800000
}
}