Profiles

Update a Device Profile

Changed on

Update a Device Profile. The Device Profile must be currently deployed.

put/deviceprofiles/{deviceProfileId}

Request

Request body

metadataunknown
presentationIdstring

Example request

{
  "components": [
    {
      "id": "main",
      "capabilities": [
        {
          "id": "switch",
          "version": 1,
          "config": {
            "values": [
              {
                "key": "thermostatMode.value"
              }
            ]
          }
        }
      ],
      "categories": [
        {
          "name": "Light"
        }
      ]
    }
  ],
  "metadata": {
    "firmWareVersion": "0.2.123",
    "manufacturerName": "SmartThingsCommunity"
  },
  "preferences": [
    {
      "title": "Temperature Offset",
      "description": "The offset for a particular temperature setting",
      "required": false,
      "preferenceType": "number",
      "definition": {
        "minimum": -10,
        "maximum": 10,
        "default": 0
      }
    }
  ],
  "presentationId": "perfectlife6617.custom-thermostat"
}

Response

The Device Profile

idstring required
namestring required
metadataunknown
presentationIdstring
migrationStatus'MIGRATED' | 'NOT_MIGRATED' required
status'DEVELOPMENT' | 'PUBLISHED' required

The lifecycle status of a device profile. 'DEVELOPMENT' - Device profile can be modified. The profile is only available to the developer and can only be used with a self-published app. 'PUBLISHED' - Device profile can be shared with other users, but cannot be modified.

Example response

{
  "id": "a362ddb6-349b-4650-9911-681b51069a57",
  "name": "thermostat1.model1",
  "metadata": {
    "firmWareVersion": "0.2.123",
    "manufacturerName": "SmartThingsCommunity"
  },
  "presentationId": "perfectlife6617.custom-thermostat",
  "preferences": [
    {
      "title": "Temperature Offset",
      "description": "The offset for a particular temperature setting"
    }
  ],
  "components": [
    {
      "id": "main",
      "capabilities": [
        {
          "id": "switch",
          "version": 1,
          "config": {
            "values": [
              {
                "key": "thermostatMode.value"
              }
            ]
          },
          "status": {
            "switch": {
              "value": "on"
            }
          }
        }
      ],
      "categories": [
        {
          "name": "Light"
        }
      ]
    }
  ]
}

Changes