Device state (state)
Last updated on June 17, 2024
The structure describes the current status of a device function. For example, you can use this structure to describe at what brightness the lamp is now shining.
The structure is used:
When the vendor sends the status of the user's devices to the Sber Smart Home:
- when responding to a request Device state (post query);
- when sending a request Posting device states (post state).
When the Sber Smart Home sends a request Device state change request (post command) to the vendor.
When the Sber Smart Home responds to the vendor's query Getting device states (get state).
Field | Type | Mandatory? | Description |
key | string | ✔︎ | Device function name (see Device functions) |
value | object | ✔︎ | Current function value (see Device function value (value)) |
{
"states": [
{
"key": string,
"value": {
"type": string,
"type_value": object
}
},
{
// ...
}
]
}
Device status description example
The device in example is operating in a colour mode.
{
"states": [
{
"key": "light_mode",
"value": {
"type": "ENUM",
"enum_value": "colour"
}
}
]
}