[ST Edge] Question about custom capability stse.sensitivityAdjustment

Hi, all.

Recently I was integrating a device which support sensitivity adjustment.
I noticed that there is already an existing custom capability stse.sensitivityAdjustment

Does anyone know what the Desc attribute does?
When I modify my profile like this

  - id: stse.sensitivityAdjustment
    version: 1
    config:
      values:
        - key: "sensitivityAdjustment.value"
          enabledValues:
            - 'Low'
            - 'High'
            - 'Desc'
        - key: "{{enumCommands}}"
          enabledValues:
            - 'Low'
            - 'High'
            - 'Desc'

The “Desc” will be displayed directly on the App, looks like a description.

But it seems “Desc” attribute does not support customization,
so what is the function of this value?

I actually want the “Desc” in the screenshot to display nothing.

I don’t know what the details of the presentation are like and
this capability is under stse namespace. So is it possible to
update stse.sensitivityAdjustment to allow users to customize
the value of"Desc" ?

Thanks !

The capability presentation is:

dashboard:
  states: []
  actions: []
detailView:
  - label: '{{i18n.label}}'
    displayType: list
    list:
      command:
        name: setSensitivityAdjustment
        alternatives:
          - key: High
            value: '{{i18n.attributes.sensitivityAdjustment.i18n.value.High.label}}'
            type: active
          - key: Medium
            value: '{{i18n.attributes.sensitivityAdjustment.i18n.value.Medium.label}}'
            type: active
          - key: Low
            value: '{{i18n.attributes.sensitivityAdjustment.i18n.value.Low.label}}'
            type: active
          - key: desc
            value: '{{i18n.attributes.sensitivityAdjustment.i18n.value.Desc.label}}'
            type: active
        argumentType: string
      state:
        value: sensitivityAdjustment.value
        valueType: string
        alternatives:
          - key: High
            value: '{{i18n.attributes.sensitivityAdjustment.i18n.value.High.label}}'
            type: active
          - key: Medium
            value: '{{i18n.attributes.sensitivityAdjustment.i18n.value.Medium.label}}'
            type: active
          - key: Low
            value: '{{i18n.attributes.sensitivityAdjustment.i18n.value.Low.label}}'
            type: active
          - key: desc
            value: '{{i18n.attributes.sensitivityAdjustment.i18n.value.Desc.label}}'
            type: active
id: stse.sensitivityAdjustment
version: 1

That is pretty ordinary and suggests ‘Desc’ is just another value. However as you can see there is some internationalisation going and the English one is:

tag: en
label: Sensitivity Adjustment
attributes:
  sensitivityAdjustment:
    label: Sensitivity Adjustment
    displayTemplate: '{{attribute}} of {{device.label}} is {{value}}'
    i18n:
      value:
        High:
          label: High
        Desc:
          label: >-
            The configuration may take some time, please wait. You could also
            click the button on the device to speed up the configuration process
        Low:
          label: Low
        Medium:
          label: Medium
commands: {}

That perhaps may give some clue as to what ‘Desc’ is meant to be doing.

Clearly it is getting some undocumented special handling in the app, though there isn’t any information to suggest whether it is specific to this capability or is a more general feature.

Thank you so much !!! @orangebucket

As the presentation file shows:

          - key: desc
            value: '{{i18n.attributes.sensitivityAdjustment.i18n.value.Desc.label}}'
            type: active

There is a key “desc” which reads the value of “Desc.label”.
And as my screenshot shows the value of “desc” really works as a “description”
So I think this key “desc” is a little special although it is undocumented too…

Anyway. My original plan was to let the “Desc” of my screenshot be empty.
Based on the presentation file you provides. I try to modify my profile like this

  - id: stse.sensitivityAdjustment
    version: 1
    config:
      values:
        - key: "sensitivityAdjustment.value"
          enabledValues:
            - 'Low'
            - 'High'
        - key: "{{enumCommands}}"
          enabledValues:
            - 'Low'
            - 'High'
        - key: "sensitivityAdjustment.value.desc"
          value: ""

Set the value of “sensitivityAdjustment.value.desc” manually but it doesn’t work…
I also tried to use “smartthings presentation:device-config:create” to change the presentation, also doesn’t work :frowning:

But if I create a new custom capability under my namespace based on these files you provided.

  - id: amberwonder26407.sensitivityAdjustment
    version: 1
    config:
      values:
        - key: "sensitivityAdjustment.value"
          enabledValues:
            - 'Low'
            - 'High'
        - key: "{{enumCommands}}"
          enabledValues:
            - 'Low'
            - 'High'
        - key: "sensitivityAdjustment.value.desc"
          value: ""

Then I can achieve my needs. App doesn’t display “Desc” anymore.

My current problems are:

  1. Is the key “desc” a special one in custom capability presentation.yaml ?
  2. Why this definition doesn’t work for stse capability, is it because of permission issues ?
        - key: "sensitivityAdjustment.value.desc"
          value: ""

I think the 2 problems are not related to “stse.sensitivityAdjustment” itself and
are very important for anyone who want to reuse/create a custom capability.

Thank you so much :slight_smile: