Smartthings Beta Edge drivers, Device profiles with value ranges defined. How to use this?

Hi @nayelyz @andresg

I have seen in the edge smartthings beta drivers that they have been added to the profiles of all devices with capabilities switchLevel values with range[1,100].

name: fibaro-dimmer-2
components:
- id: main
  capabilities:
  - id: switch
    version: 1
  - id: switchLevel
    version: 1
    config:
      values:
        - key: "level.value"
          range: [1, 100]
  - id: powerMeter
    version: 1
  - id: energyMeter
    version: 1
  - id: refresh
    version: 1
  categories:
  - name: Switch
preferences:
  • How is this used?
  • Does it replace creating a custom VID for a stock capability?
  • Can it be used for other capabilities?
  • The value switchLevel = 0 should not be used or will it not be able to be used from now on for some reason?
    For example, if you use the transition time argument for on and off, what the device does internally is decrease the level in steps until it reaches level 0 and turns off.
    Will there be any problem to continue using this?

I have been looking for information, but I am quite clumsy and I have not found anything

Any information could help clarify doubts

Thank you

2 Likes

Wow, if that’s true, I’ll be more then happy. I’ll try to figure it out our wait for the others’ response. Whatever first :slight_smile:

EDIT: it really works. Thank you @Mariano_Colmenarejo for finding this out. I can now get rid of custom presentation just to narrow the color temperature value fort lights.

1 Like

I poked around a little and I found out that it is even possible to narrow the enum values using this feature:

name: philio-sound-siren
components:
- id: main
  capabilities:
  - id: alarm
    version: 1
    config:
      values:
        - key: "alarm.value"
          enabledValues:
            - both
            - off
  - id: chime
    version: 1

So please welcome, yet another undocumented SmartThings feature :slight_smile:

1 Like

Accepting this configuration is a work in progress, that’s why it isn’t fully documented. The team is aware of the requirement for it.
Currently, it doesn’t replace the usage of a custom device presentation as not all properties are accepted.

Yes, it should work for any capability

This was set to 1 because there were some inconsistencies observed creating routines that turned on the device with a 0% level in the dimmer as 0 represents “off”.
You can still send a 0% value through the API even if the presentation doesn’t allow it, the default range of the capability is 0-100%

3 Likes

Thanks @nayelyz

This can be very useful :clap:

1 Like