ST Edge Driver - Custom slider component with labels

Hi,

I’m creating a driver for my robot vacuum cleaner and I’m having trouble changing the behavior of the slider component.

As shown in the image, I’m unable to change the numerical values ​​to labels. e.g. (1 = Low, 2 = Medium, etc.)

Capability:

name: Water Volume
status: proposed
attributes:
  waterVolume:
    schema:
      type: object
      additionalProperties: false
      properties:
        value:
          type: integer
          minimum: 0
          maximum: 2
      required:
        - value
    setter: setWaterVolume

commands:
  setWaterVolume:
    name: setWaterVolume
    arguments:
      - name: value
        optional: false
        schema:
          type: integer
          minimum: 0
          maximum: 2

id: signalprogram56169.waterVolume
version: 1

Presentation:

"detailView": [
    {
      "label": "Volume de água",
      "displayType": "slider",
      "slider": {
        "range": [0, 2],
        "step": 1,
        "unit": "",
        "command": "setWaterVolume",
        "argumentType": "integer",
        "value": "waterVolume.value",
        "alternatives": [
          {
            "key": 0,
            "value": "Baixo",
            "type": "active"
          },
          {
            "key": 1,
            "value": "Médio",
            "type": "active"
          },
          {
            "key": 2,
            "value": "Alto",
            "type": "active"
          }
        ]
      }
    }
  ],

Hi, just to clarify, the engineering team confirmed that the slider and stepper display types (which are similar) do not currently support alternatives. Because of this, the value will be shown as a numeric value (integer) instead of displaying the labels defined in the alternatives.

So what you’re seeing is the expected behavior.