Here are the basic steps. Each of these is potentially a topic by itself, and I’d recommend looking at the API docs for reference on how to build the various inputs for each.
Create the capability:
smartthings capabilities:create -j -i new_cap.json
Create translations for the capability. You can also use update or create, but upsert will avoid errors since the en
locale is created by default when the capability is created.
smartthings capabilities:translations:upsert -j -i new_cap_translation.json
Create the capability presentation, referencing the translations you just created for any labels.
smartthings capabilities:presentation:create -j -i new_cap_presentation.json
Add the capability to the profile.yml in your driver (and elsewhere in your driver as necessary). That’s usually enough, but if you need something special like a multi-attribute dashboard or visible conditions then create a device configuration and add the resulting vid and mnmn to your profile.yml.
smartthings presentation:device-config:create -j -i new_device_config.json
Assuming you’ve already created a channel and enrolled your hub, you can package/assign/install in one step.
smartthings edge:drivers:package driver_package_directory -I