Smart Home TemperatureControl Trait Schema

action.devices.traits.TemperatureControl - Trait for devices (other than thermostats) that support controlling temperature, either within or around the device. This includes devices such as ovens and refrigerators. This differs from the TemperatureSetting trait, which is specifically for thermostat control.

Device ATTRIBUTES

Attribute Definition
temperatureRange Defines the temperature range.
  • minThresholdCelsius Float. Minimum temperature for the range, in Celsius.
  • maxThresholdCelsius Float. Maximum temperature for the range, in Celsius.
temperatureStepCelsiusFloat. Optional. Specifies the relative temperature step. For example, this might be 5 degrees on an oven or 1 degree on a kettle.
temperatureUnitForUXValid values include "C" or "F". This unit will be used in responses to the user.
The following is an example:
{
  "temperatureRange": {
    "minThresholdCelsius": 65.5,
    "maxThresholdCelsius": 288
  },
  "temperatureStepCelsius": 2.778,
  "temperatureUnitForUX": "F"
}

Sample SYNC Request and Response

Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.SYNC",
  }]
}
Response
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "agentUserId": "1836.15267389",
    "devices": [{
      "id": "123",
      "type": "action.devices.types.KETTLE",
      "traits": [
        "action.devices.traits.OnOff",
        "action.devices.traits.TemperatureControl"
      ],
      "name": {
        "defaultNames": ["Smart Kettle 1"],
        "name": "Smart Kettle 1",
        "nicknames": ["Little teapot"]
      },
      "willReportState": false,
      "attributes": {
        "temperatureRange": {
          "minThresholdCelsius": 30,
          "maxThresholdCelsius": 100
        },
        "temperatureStepCelsius": 1,
        "temperatureUnitForUX": "C"
      },
      "deviceInfo": {
        "manufacturer": "Smart Home Provider",
        "model": "g1340",
        "swVersion": "1.0.31",
        "hwVersion": "1.1"
      },
      "customData": {
        "smartHomeProviderId": "fiGgZ0vrhFRgwf5XJkna2GRwO8z80J"
      }
    }]
  }
}
Validator

Device STATES

State Definition
temperatureSetpointCelsius Float. Required. The current temperature setpoint, in Celsius.
temperatureAmbientCelsius Float. Optional. The currently observed temperature, in Celsius.

Sample QUERY Request and Response

What temperature is the oven set to?
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.QUERY",
    "payload": {
      "devices": [{
        "id": "123",
      }]
    }
  }]
}
Response
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "devices": {
      "123": {
        "on": true,
        "online": true,
        "temperatureSetpointCelsius": 177,
        "temperatureAmbientCelsius": 150
      }
    }
  }
}

Device COMMANDS

Command Parameters/Definition
action.devices.commands.SetTemperature temperature Float. The temperature to set, in Celsius.

Sample EXECUTE Request and Response

Set the oven to 350 degrees.
Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123",
          "customData": {
            "fooValue": 74,
            "barValue": true,
            "bazValue": "lambtwirl"
          }
        }],
        "execution": [{
          "command": "action.devices.commands.SetTemperature",
          "params": {
            "temperature": 176.67
          }
        }]
      }]
    }
  }]
}
Response
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [{
      "ids": ["123"],
      "status": "SUCCESS",
      "states": {
         "temperatureSetpointCelsius": 177,
         "temperatureAmbientCelsius": 140
      }
    }]
  }
}