"mode" capability and "proposed" state

We are looking at creating our own device profile with “mode” capability.

  1. Does “purposed” mean we cannot use it in production or it something waiting for approval or removal?

  1. if we use “mode” capability, how can we send the supported “modes” ? since discovery will contain only the profile id in “deviceHandlerType”

Hey, @aruna_t

  1. The proposed status means that the capability is under development. In this case, I tried to replicate your implementation and on the first try the Mode capability didn’t show up at the detail view when the state is populating the dashboard, so I’ll be looking for more information about this with the team.

Also, if you want to dig into the capability, I recommend you to setup the SmartThings CLI and run the following commands to get its metadata:

    # definition
    st capabilities mode --json
    # presentation
    st capabilities:presentation mode --json
  1. To send the supported modes over ST Schema, you’ll need to send an array of the modes at your deviceState.states, e.g.:
...
.stateRefreshHandler((accessToken, response) => {
    response.addDevice('external-device-1', [
      {
        component: 'main',
        capability: 'st.mode',
        attribute: 'supportedModes',
        value: ['mode_x', 'mode_y','mode_z']
      },

…by the way, welcome back = )

1 Like

Thank you for your reply. Your answer was very helpful. Didn’t know about SmartThings CLI

Hi @erickv

Please let me know if you found out why modes are not displaying in the app. I found the same issue as well.

Discovery

{"headers":{"schema":"st-schema","version":"1.0","interactionType":"discoveryResponse","requestId":"4BBB34B8-AC1E-4F4F-B72F-859F81DD3B72"},"devices":[{"externalDeviceId":"60a9443bfc79483f1ce53efe","deviceUniqueId":"60a9443bfc79483f1ce53efe","deviceCookie":{},"friendlyName":"Lightshow2","manufacturerInfo":{"manufacturerName":"SinricPro","modelName":"Custom Device","hwVersion":"1.0","swVersion":"1.0"},"deviceContext":{"roomName":"Bedroom","categories":["light"]},"deviceHandlerType":"d964e766-3124-4da5-98e9-869d02d277da"}]}

{"headers":{"schema":"st-schema","version":"1.0","interactionType":"stateRefreshResponse","requestId":"4BBB34B8-AC1E-4F4F-B72F-859F81DD3B72"},"deviceState":[{"externalDeviceId":"60a9443bfc79483f1ce53efe","states":[{"component":"main","capability":"st.switch","attribute":"switch","value":"off"},{"component":"main","capability":"st.mode","attribute":"supportedModes","value":["White","Blue","Aqua","Lightshow"]},{"component":"main","capability":"st.healthCheck","attribute":"healthStatus","value":"online"}]}]}

App:

Hey, @aruna_t

I share this finding with our team and this issue is because the capability still under development, however, there’s a chance to update the metadata from a new Device Configuration based on your device profile. So, let me dig in and as soon as I get an update, I’ll share it with you.

For a better reference on how to generate the metadata from your device profile, check this CLI resource.