Traits
What are Traits?
A Trait is a JSON data element that represents the data schema that describes specific device functionality within Yonomi Platform. A 'Trait' represents a single composable unit of device capability, functionality, or behavior.
Yonomi Platform uses traits to expose device interactions via its GraphQL API.
Traits are designed to capture the core functionality of devices in a standardized manner, making integration more accessible and reducing the time required for device integration.
Traits ensure that the functionality of devices within YP can be composed together seamlessly while still allowing for flexibility.
Using traits, devices can be integrated more effectively, allowing for standardized interactions and a consistent user experience.
Traits address 3 different types of device functionality:
- States
- Actions
- Notifications

Trait Attributes Overview
States
State represents the current state of specific functionality or persisted data related to the device. For example, in a lock trait, the state could represent the current lock status.
Actions
Actions enable interaction with devices from the cloud. Actions can be executed on a device and may take action-arguments. Actions can cause changes in the device's behavior or settings, such as changing the lock status or timezone settings. They can also trigger temporary effects like playing an alert or flashing a light.
Notifications
Notifications communicate transient information from the device to the platform or users. Examples of notifications include when a lock enters passage or secure mode and what caused the change.
What made this section unhelpful for you?
On this page
- Traits