Device function value (value)
Last updated on June 17, 2024
This structure is used for:
- Indicating the device status (see the Device state (state) structure).
- Describing a function dependencies (see the Function dependencies (dependencies) structure).
Field | Type | Mandatory? | Description |
type | string | ✔︎ | The data types to transmit the value are as follows:
|
float_value | number | Real value | |
integer_value | string | Integer value in "long" format, written as a string | |
string_value | string | String value | |
bool_value | boolean | Logical value | |
enum_value | string | Enumerated value | |
colour_value | colour | Colour in HSV format: {"h":int,"s":int,"v":int}. Available values:
|
{
"key": string,
"value": {
"type": string,
"type_value": object
}
}
Device function value example
The example describes the function light_mode, which has the value colour
(colour mode of operation).
{
"key": "light_mode",
"value": {
"type": "ENUM",
"enum_value": "colour"
}
}