Device TYPE
action.devices.types.THERMOSTAT
Thermostats are temperature-managing devices, with set points
and modes. This separates them from heaters and AC units which may only have modes and settings
(for example, high/low) vs a temperature target.
Home Automation commands are frequently chained in EXECUTION intents. A user who says Set the heat to 72 will generate a mode command followed by a temperature set.
This guide is aimed at parity with our existing thermostat functionality. Once we've migrated everything to the new architecture, we'll add significantly more thermostat support logic.
This type indicates that the device gets the thermostat icon and some thermostat-type synonyms/aliases. Unlike the light/outlet/switch types, it's largely 1:1 with the TRAIT (since a plug might really be a light, etc, but thermostats are their own thing). Devices of type Thermostat control temperature, whereas some heating/cooling room units have different controls and high/low modes, but not temperature controls.
Recommended TRAITS
action.devices.traits.TemperatureSetting
- This trait covers
handling both temperature point and modes.
These are our recommendations for traits on this type of
device, however you are free to mix and match from all available traits to best match your existing
product functionality.
Please see each individual trait document for implementation details like required attributes,
EXECUTE and QUERY.
Sample SYNC Request and Response
This is an example using the device type and traits above. It is intended to give an idea of how to build a SYNC response. If you add or remove traits, this will need to be modified to reflect those changes.
Initialize thermostat setup.
{ "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf", "inputs": [{ "intent": "action.devices.SYNC", }] }
{ "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": false, "attributes": { "availableThermostatModes": "off,heat,cool,on", "thermostatTemperatureUnit": "F" }, "deviceInfo": { "manufacturer": "AAA", "model": "t-1000", "hwVersion": "3.2", "swVersion": "11.4" }, "customData": { "fooValue": 74, "barValue": true, "bazValue": "lambtwirl" } }] } }
Device ERRORS
The error codes extend the primary list in the DevGuide. Additional errors will be added as needed. Not all thermostats may evince all errors.
inHeatOrCool
- Heat/Cool/Range commands failed because device is in explicit heat or cool.inHeatCool
- Heat or Cool commands failed because device is in heat or cool.lockedToRange
- Device is locked to a temperature range or mode, and the requested change can't be made.rangeTooClose
- Temperature points on a heatcool range are too close to each other.