Smart Home TemperatureSetting Trait Schema

action.devices.traits.TemperatureSetting - This trait covers handling both temperature point and modes.

Device ATTRIBUTES

Attribute Definition
availableThermostatModes Comma-separated list of modes supported by this specific device. Currently supports specific known modes from the following list; more and custom ones will be added as needed. These modes all have local expansion aliases (off == "standby", etc).
  • off Heating/Cooling activity disabled.
  • heat If the device supports heating.
  • cool If the device supports cooling.
  • on If off, on restores the previous mode of the device.
  • heatcool If the device supports maintaining heating/cooling to target a range.
thermostatTemperatureUnit C or F. The unit the device is set to by default. The device "speaks" using its display unit.

Sample SYNC Request and Response

Initialize Thermostat setting.
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.THERMOSTAT",
      "traits": [
        "action.devices.traits.TemperatureSetting"
      ],
      "name": {
        "defaultNames": ["Honeywell Thermostat T-1000"],
        "name": "Homer Simpson Thermostat",
        "nicknames": ["living room thermostat"]
      },
      "willReportState": true,
      "attributes": {
        "availableThermostatModes": "off,heat,cool,on",
        "thermostatTemperatureUnit": "F"
      },
      "deviceInfo": {
        "manufacturer": "honeywell",
        "model": "t-1000",
        "hwVersion": "3.2",
        "swVersion": "11.4"
      },
      "customData": {
        "fooValue": 74,
        "barValue": true,
        "bazValue": "lambtwirl"
      }
    }]
  }
}
Validator

Device STATES

State Definition
thermostatMode Current mode of the device, with the same values as the attribute
thermostatTemperatureSetpoint Current temperature set point (single target), in C
thermostatTemperatureAmbient Current observe temperature, in C
thermostatTemperatureSetpointHigh Current high point if in heatcool mode, for a range
thermostatTemperatureSetpointLow Current low point if in heatcool mode, for a range
thermostatHumidityAmbient Float. 0-100. If available from the device.

Sample QUERY Request and Response

Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
      "intent": "action.devices.QUERY",
      "payload": {
        "devices": [{
          "id": "123",
          "customData": {
            "fooValue": 74,
            "barValue": true,
            "bazValue": "lambtwirl"
          }
        }]
      }
  }]
}
Response
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "devices": {
      "123": {
        "online": true,
        "thermostatMode": "cool",
        "thermostatTemperatureSetpoint": 23.0,
        "thermostatTemperatureAmbient": 25.1,
        "thermostatHumidityAmbient": 45.3
      }
    }
  }
}

Device COMMANDS

Command Parameters/Definition
action.devices.commands.ThermostatTemperatureSetpoint thermostatTemperatureSetpoint Float (in speech we generally take 1 decimal point, for Celsius users).
action.devices.commands.ThermostatTemperatureSetRange thermostatTemperatureSetpointHigh
thermostatTemperatureSetpointLow
Floats. The high and low set points for a range. This works if and only if the device supports heatcool mode, and we will set that mode if a range is requested.
action.devices.commands.ThermostatSetMode thermostatMode One of the supported modes on the device.

Sample EXECUTE Request and Response

Request
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "inputs": [{
    "intent": "action.devices.EXECUTE",
    "payload": {
      "commands": [{
        "devices": [{
          "id": "123",
          "customData": {
            "fooValue": 74,
            "barValue": true,
            "bazValue": "sheepdip"
          }
        }],
        "execution": [{
          "command":   "action.devices.commands.ThermostatTemperatureSetpoint",
          "params": {
            "thermostatTemperatureSetpoint": 22.0
          }
        }]
      }]
    }
  }]
}
Response
{
  "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
  "payload": {
    "commands": [{
      "ids": ["123"],
      "status": "SUCCESS",
      "states": {
        "thermostatMode": "cool",
        "thermostatTemperatureSetpoint": 22.0,
        "thermostatTemperatureAmbient": 25.1,
        "thermostatHumidityAmbient": 43.2
      }
    }]
  }
}