Display types are used in Capability Presentations. They identify different visual representations that can be used to display a Capability in the SmartThings app. Each Capability Presentation view (dashboard, detail, automation) supports various display types, described here.
pushButton display type renders a Capability as a button on the dashboard. This display type requires an associated command and may have an argument to be sent.
There are multiple display types for switches. All switches follow a similar structure, but render differently in the SmartThings app. Available types include:
switch- renders with an on/off icon
toggleSwitch- renders with an on/standby icon
standbyPowerSwitch- renders a sliding toggle
The example dashboard switch below demonstrates a toggle switch:
playStatus is similar to a switch type, but will display as a play, pause, or stop symbol in the dashboard. Rendering options include
playPause. Both have a similar payload structure for describing the state of a player:
This display type follows the format found in the pushButton Dashboard display types.
This display type follows the format found in the playStatus Dashboard display types
slider can be used to select a range of integer values. This can be useful for describing a temperature or volume.
A list can be used to display and select a number of options available for a Capability. The list elements are described in the
alternatives section of the payload. The following is an abbreviated example of a list display type for a thermostat:
textField is used for text input and display. This view will have an “Edit” button rendered in the UI. This button will pop open an input screen with a field for user text input, “Cancel”, and “OK” buttons:
If an integer value is used for input, consider using
numberField instead of
textField. A min and max value can be specified:
stepper is useful for incremental input changes. Instead of having the user input a temperature, the user can increase or decrease the value with a +/- icon:
state display type is used to provide information about a Capability’s state to the user and does not provide an option to control the Device:
Automations display types differ from dashboard and detail view types in that conditions and actions are specified separately (
”value” for conditions,
”command” for actions).