About capabilities

A capability is the Device object property that describes its features. Each device is described by at least one capability unless it has properties. The Yango home platform doesn't restrict how providers select device capabilities, so users may have devices with a non-standard device_type: capability binding (for example, a TV can have the “temperature” function).

The smart home platform has a specific list of supported capabilities. If the provider's response to the request of Information about user devices contains unknown capabilities, invalid format, or invalid values, the user will not be able to control the device.

Tip.

To check the validity of parameters and view validation errors, use the Testing section in the developer console.

The Yasmina voice assistant or  Yasmina Home app builds a device control model based on the set capabilities: Yasmina selects the appropriate voice control scenarios, and the  Yasmina Home app displays the controls and screens that correspond to the capabilities.

Depending on the operation performed, different sets of fields are passed in the Capability object:
  1. The device capability description is used in the Information about user devices operation:
    {
        "type": {string},
        "retrievable": {boolean},
        "reportable": {boolean},
        "parameters": {CapabilityParameterObject}
    }          
  2. State of the device capability is used in the operations Information about the states of user devices, Notification about device state change:
    {
        "type": {string},
        "state": {
          "instance": {string},
          "value": {InstanceValue}
        }
    }
  3. Commands to control device capabilities are used in the Change device state operation:
    {
        "type": {string},
        "state": {
          "instance": {string},
          "value": {InstanceValue}
        }
    }

Types of capabilities

Type of capability Description
on_off

Remote device on/off (similar to pressing the power button on the device or its remote control). This is a basic capability for most devices.

color_setting
Color control for device lighting elements. The device may have one or more of the following functions:
  • Changing the color of its lighting elements to any color from the HSV or RGB model.
  • Changing the color temperature of its lighting elements.
  • Playing back different visual effects.
mode

Switching device operation modes (for example, switching between air conditioner temperature modes: “Cooling”, “Heating”, or “Auto”).

range

Control of device parameters that have a range of values. For example, the brightness of a lamp, the volume of sound, or the temperature of a heater.

toggle

Control of device parameters that can only be in one of two states. For example, buttons, toggles, and similar controls that enable or disable an additional function of the device.

Type of capability Description
on_off

Remote device on/off (similar to pressing the power button on the device or its remote control). This is a basic capability for most devices.

color_setting
Color control for device lighting elements. The device may have one or more of the following functions:
  • Changing the color of its lighting elements to any color from the HSV or RGB model.
  • Changing the color temperature of its lighting elements.
  • Playing back different visual effects.
mode

Switching device operation modes (for example, switching between air conditioner temperature modes: “Cooling”, “Heating”, or “Auto”).

range

Control of device parameters that have a range of values. For example, the brightness of a lamp, the volume of sound, or the temperature of a heater.

toggle

Control of device parameters that can only be in one of two states. For example, buttons, toggles, and similar controls that enable or disable an additional function of the device.