Function dependencies (dependencies)

The structure describes the dependency of device model functions: when one function is available only if the other is in a certain state.

For example, some models of color lamps can usually operate in two modes: color and white light mode. Depending on which mode the user has selected, the range of available functions must also change:

  • If color mode is selected, the lamp color change function should become available.
  • If white light mode is selected, the color selection function should be disabled.
Field Type Mandatory? Description
dependencies map<string, object> ✔︎ Contains pairs of values: the dependent function and the function defining its availability
func_name string ✔︎ Dependent device function means a function with its availability changing, depending on the state of another function.

List of functions (see Device functions)

key string ✔︎ The function that determines the availability of the dependent function.

List of functions (see Device functions)

values object ✔︎ The values of the key function at which the dependencies function becomes available (see Device function value (value))
{
    "dependencies": {
        "func_name": {
            "key": "string",
            "values": [
                {
                    "type": string,
                    "type_value": object
                },
                {
                    // ...
                },
            ]
        },
        {
            // ...
        }
    }
}