Edge driver device-config creation

Here’s where I’ve been successful so far:

  1. Show/hide capabilities in dashboard and detailView without any internal configuration changes
  2. Modify the label and alternatives in dashboard
  3. Modify the label, range and alternatives for fanSpeed in detailView

Here’s where I still have trouble. I have a custom capability with 2 attributes-- mode and filter. mode is displayed as a list with supportedValues: filter.value. The filter works as expected. When I apply my device-config, the dashboard changes, but the detailView is unchanged. When I smartthings presentation:device-config:create, the correct details scroll up the screen. However, if I go back and examine the vid, the changes to detailView are missing. Is this even supposed to work?

My goal is to create multiple devices with different list contents. I could just create unique custom capabilities and custom presentations. That means I have to manage more IDs. I could also have a single custom capability with all possible list contents and use the filter. That’s also messy. If I can use config-device to alter the list contents, then it becomes a one-time configuration issue with no code changes.

Here are my yaml files. The files are intentionally sparse. I don’t think more quotes or empty/default values are going to change anything. I’ve used generic content so that I can easily see if the device-config has been applied.

profile

name: scope
components:
- id: main
  capabilities:
  - id: dictionaryorigin49938.modeFilterPush129
    version: 1
  categories:
  - name: Fan    
metadata:
  mnmn: SmartThingsCommunity
  vid: e98944f2-170d-3260-b295-f73e2c08d31b

capability

name: mode filter push 129
attributes:
  mode:
    setter: setMode
    schema:
      type: object
      additionalProperties: false
      properties:
        value:
          type: integer
          default: 0
  filter:
    schema:
      type: object
      additionalProperties: false
      properties:
        value:
          type: array
          items:
            enum: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
commands:
  setMode:
    name: setMode
    arguments:
      - name: value
        optional: false
        schema:
          type: integer
  nextMode:
    name: nextMode
    arguments: []

presentation

id: dictionaryorigin49938.filterStatusPush129
dashboard:
  states:
    - label: dashboard
  actions:
    - displayType: pushButton
      pushButton:
        command: nextMode
detailView:
  - label: detailView
    displayType: list
    list:
      command:
        name: setMode
        argumentType: integer
        supportedValues: filter.value
        alternatives:
          - key: 0
            value: 0
          - key: 1
            value: 1
          - key: 2
            value: 2
          - key: 3
            value: 3
          - key: 4
            value: 4
          - key: 5
            value: 5
          - key: 6
            value: 6
          - key: 7
            value: 7
          - key: 8
            value: 8
          - key: 9
            value: 9
      state:
        value: mode.value
        valueType: integer
        alternatives:
          - key: 0
            value: 0
          - key: 1
            value: 1
          - key: 2
            value: 2
          - key: 3
            value: 3
          - key: 4
            value: 4
          - key: 5
            value: 5
          - key: 6
            value: 6
          - key: 7
            value: 7
          - key: 8
            value: 8
          - key: 9
            value: 9

device-config

type: profile
dashboard:
  states:
    - component: main
      capability: dictionaryorigin49938.modeFilterPush129
      version: 1
      values:
        - key: mode
          label: '{{mode.value}}'
          alternatives:
            - key: 0
              value: Off
              type: inactive
            - key: 1
              value: Fast
            - key: 2
              value: Medium
            - key: 3
              value: Slow
  actions:
    - component: main
      capability: dictionaryorigin49938.modeFilterPush129
      version: 1
detailView:
  - component: main
    capability: dictionaryorigin49938.modeFilterPush129
    version: 1
    values:
      - key: mode
        label: Speed
        alternatives:
          - key: 0
            value: Off
          - key: 1
            value: Dim
          - key: 2
            value: On
          - key: 3
            value: Bright