Embedded Config with Enumerated Attribute

I am trying to utilize the new embedded configs to adjust the options available for an enumerated attribute. I am following this from the docs:

Example Capability:

id: myCap
version: 1
status: proposed
name: My Cap
ephemeral: false
attributes:
  mode:
    schema:
      type: object
      properties:
        value:
          type: string
          enum:
            - one
            - two
            - three
            - four
      additionalProperties: false
      required:
        - value
    enumCommands: []
commands:
  myCommand:
    name: myCommand
    arguments:
      - name: mode
        optional: false
        schema:
          type: string
          enum:
            - one
            - two
            - three
            - four

Example Profile:

name: myProfile
components:
  - id: main
    capabilities:
      - id: switch
        version: 1
      - id: refresh
        version: 1
      - id: myCap
        version: 1
        config:
          values:
            - key: mode.value
              enabledValues:
                - one
            - key: myCommand
              enabledValues:
                - one
    categories:
      - name: Light

@nayelyz Do you know if this is actually supported yet? I end up seeing all of the enumerated values. No filtering is taking place when I add the embedded config.

Did you check the configuration from the generated presentation once you install the device?
I’ll check with the team, but knowing that would be useful as well.

I ran smartthings deviceprofiles:presentation with the profile ID and it does show the correct values there. That list is filtered.

Actually, the translations in there are filtered. How can I verify that the UI will be filtered?

This example is not intended to be comprehensive. It shows only the range property; all other device configuration properties, such as enabledValues and patch , may also be set in this way.
Source: Embedded Device Configurations | SmartThings Developers

The docs mentioned property “patch”… it made me think about which are all other available properties and what they do. Hopefully, “label” is one the them.

1 Like

This would also be great. Would really cut down on the custom presentations

1 Like