Unable to use statelessPowerToggle in presentation

I am attempting to use statelessPowerToggle in a presentation for a custom capability. It is referenced here: Display Types | SmartThings Developers

When trying to create the presentation I am seeing this error:

Error: Request failed with status code 422: 
{"requestId":"XXXXXX","error":{"code":"4000000","message":"Invalid displayType. This is not permitted. at detailView[]","details":[]}}

I am looking for a simple stateless button and label to put in the detail view. There is no ‘off’ action which is why I want it to be stateless. The action can be triggered, but not stopped. It auto-stops.

For reference, here is the relevant portion of the presentation:

detailView:
  - label: Blink
    displayType: statelessPowerToggle
    statelessPowerToggle:
      command:
        name: blink
        on: active
        off: standby
      state:
        value: state.value
        valueType: string
        on: active
        off: standby
        label: '{{state.value}}'
        alternatives:
          - key: disabled
            value: Disabled
            type: inactive
          - key: standby
            value: Standby
            type: inactive
          - key: active
            value: Active
            type: active

Hi, @blueyetisoftware!
I see the same behavior. I’ll check with the engineering team to see if it’s supported or what’s causing the issue.

Thank you for bringing this up!

1 Like

According to the API reference, the statelessPowerToggle is only valid for the dashboard view.

The referenced documentation page also only listed it under the dashboard view, and doesn’t actually say which switches are valid in the detail view. Indeed the switches section of the detail view looks unfinished compared to the other bits. They seem to have really lost interest by the time they get to automations.

I noticed that as well. The docs made it look like switches were only available on the dashboard, but they obviously work in other views.

Hi, @blueyetisoftware!
I confirmed with the team that this display type only works in the Dashboard View. Here’s an example:

"dashboard": {
  "actions": [
      {
          "displayType": "statelessPowerToggle",
          "statelessPowerToggle": {
              "command": "blink",
              "argument": "active" // or "standby"
          }
      }
  ]