Alexa.ThermostatController interface in your Alexa add-on so that users can control smart thermostats. A thermostat can control devices, such as furnaces, air conditioners, and water heaters. For more details about smart home add-ons, see Connect Your Device Cloud with Smart Home Add-ons.
A thermostat is a device that senses temperature, and attempts to keep the temperature at a specified setpoint or within a specified temperature range. You can use the ThermostatController interface for devices with up to two setpoints, different thermostat modes, and programmable thermostat schedules. Typically you use the ThermostatController interface with the Alexa.TemperatureSensor interface.
Implement the other Alexa.ThermostatController interfaces based on the features that your device supports:
- To download the heating, ventilation, and air conditioning (HVAC) system configuration from the Alexa app to your thermostat, implement the
Alexa.ThermostatController.Configurationinterface. - To enable a customer to set a temperature schedule on your thermostat, implement the
Alexa.ThermostatController.Scheduleinterface. - To enable Alexa to estimate the energy use of a thermostat or HVAC system, implement the
Alexa.ThermostatController.HVAC.Componentsinterface.
ThermostatController interface supports, see List of Alexa Interfaces and Supported Languages. For the definitions of the message properties, see Alexa Interface Message and Property Reference.
Version changes
This version adds support for adaptive recovery and a new thermostat mode, called emergency heating.Utterances
When you use theAlexa.ThermostatController interface, the Alexa service provides the voice interaction model for you. After the user says one of these utterances, Alexa sends a corresponding directive or report state request to your add-on.
The following examples show some user utterances:
- Dutch
- English (All)
- French (All)
- German
- Hindi
- Italian
- Japanese
- Portuguese
- Spanish (All)
Thermostat setpoint types
Alexa supports thermostats with one or two setpoints. Single-setpoint thermostats A single-setpoint thermostat has a single temperature setting that it attempts to maintain. For example, a thermostat with a single setpoint might turn on the furnace when the temperature falls below the setpoint, and turn off the furnace when the temperature rises above the setpoint. Dual-setpoint thermostats A dual-setpoint thermostat has two temperature settings, a lower and upper setpoint. The thermostat maintains the temperature within the range between the setpoints. A thermostat can support different setpoints when in different modes. For details, see Reportable properties.Thermostat scheduling
When a user sets a temperature, they can specify a hold duration. For example, a user can say If your device supports hold durations, you specify it in your discovery response. If your device supports a user request to set the temperature or thermostat mode on a weekly schedule, implement theAlexa.ThermostatController.Schedule interface.
Adaptive recovery
A thermostat that supports adaptive recovery starts the HVAC system early enough to reach the programmed temperature on schedule. If your add-on implements theAlexa.ThermostatController.Schedule and your device supports adaptive recovery, you report pre-heating or pre-cooling in progress. After the temperature reaches the target setpoint, you report that adaptive recovery is inactive. For example, if the target heating temperature is 70°F at 6:00 PM, the thermostat might start heating at 5:55 PM. After you report the state change, the Alexa app displays a visual cue that pre-heating or pre-cooling is in progress.
The customer can enable and disable adaptive recovery in the Alexa.ThermostatController.Schedule interface.
Reportable properties
TheAlexa.ThermostatController interface defines the following reportable properties. You identify the properties that you support in your discovery response. All the properties are optional. Include only the properties that match the components of your thermostat device.
| Property | Description | Type |
|---|---|---|
targetSetpoint | The thermostat should maintain the temperature at this setpoint. Single-setpoint thermostats use this property. | Temperature object |
lowerSetpoint | The thermostat should maintain the temperature above this setpoint. Dual-setpoint thermostats use this property. | Temperature object |
upperSetpoint | The thermostat should maintain the temperature below this setpoint. Dual-setpoint thermostats use this property. | Temperature object |
thermostatMode | The current mode of the thermostat. | ThermostatMode object |
adaptiveRecoveryStatus | The current status of pre-heating or pre-cooling. Valid values: PREHEATING, PRECOOLING, INACTIVE. | String |
HEAT or COOL mode, and support lower and upper setpoints when in AUTO or ECO mode.
ThermostatMode values
The following table shows the mode values for thermostats. A thermostat might not support all modes.| Value | Description |
|---|---|
AUTO | Automatic heating or cooling based on the current temperature and the setpoint. |
COOL | Cooling mode. |
ECO | Economy mode. |
EM_HEAT | Emergency heating mode. This mode uses a backup heat source as an additional heat source. For example, a customer might use emergency heat in extreme cold or when the heat pump is broken. Customers can set this mode in device settings in the Alexa app. |
HEAT | Heating mode. |
OFF | Heating and cooling are off, but the device might still have power. |
Discovery
You describe endpoints that supportAlexa.ThermostatController by using the standard discovery mechanism described in Alexa.Discovery.
Set retrievable to true for the properties that you report when Alexa sends your add-on a state report request. Set proactivelyReported to true for the properties that you proactively report to Alexa in a change report.
Use THERMOSTAT for the display category. For the full list of display categories, see display categories.
To let Alexa know the health of your device, also implement the Alexa.EndpointHealth interface.
Configuration object
In addition to the usual discovery response fields, forAlexa.ThermostatController, include a configuration object that contains the following fields.
| Field | Description | Type | Required |
|---|---|---|---|
supportedModes | Indicates the modes that the device supports. You must include at least one of HEAT or COOL thermostat modes. | Array of ThermostatMode strings | Yes |
supportsScheduling | Set to true if a user can specify a setpoint for an amount of time. For example, the user can set the temperature to 70 degrees for 30 minutes. The default is false. | Boolean | No |
Discover response example
The following example shows aDiscover.Response message for an Alexa add-on that controls a thermostat and supports the Alexa.ThermostatController and Alexa.TemperatureSensor interfaces. In this example, the endpoint is a dual-setpoint thermostat, with three modes.
Dual setpoint thermostat example
Dual setpoint thermostat example
Discover response example for an air conditioner
Typically air conditioners support a single setpoint, and only have a cooling mode. Unlike thermostats, which are usually on all the time, users turn air conditioners on and off. For an air conditioner, Amazon recommends that you also implement theAlexa.PowerController interface, and keep the PowerController synchronized with the ThermostatController as shown in the following list:
- When the thermostat controller mode is set to
COOL, the power controller power state is set toON. - When the thermostat controller mode is set to
OFF, the power controller power state is set toOFF.
Discover.Response message for an Alexa add-on that controls an air conditioner and supports the ThermostatController and Alexa.PowerController interfaces. The response includes the Alexa.TemperatureSensor interface for an air conditioner that displays the temperature.
Air conditioner example
Air conditioner example
Directives
Alexa sends the followingAlexa.ThermostatController interface directives to your add-on.
SetTargetTemperature directive
Support theSetTargetTemperature directive so that users can specify the temperature that they want a thermostat to maintain. The user can optionally specify the duration for the new temperature setting.
The following examples show user utterances:
- Dutch
- English (All)
- French (All)
- German
- Hindi
- Italian
- Japanese
- Portuguese
- Spanish (All)
SetTargetTemperature directive examples
The following example shows aSetTargetTemperature directive that Alexa sends to your add-on for a single-setpoint thermostat.
Single-setpoint thermostat example
Single-setpoint thermostat example
SetTargetTemperature directive that Alexa sends to your add-on for a dual-setpoint thermostat.
Dual-setpoint thermostat example
Dual-setpoint thermostat example
SetTargetTemperature directive payload
| Property | Description | Type | Required |
|---|---|---|---|
targetSetpoint | Thermostat should maintain the temperature at this setpoint. Alexa includes this field for single-setpoint thermostats. | Temperature object | No |
lowerSetpoint | Thermostat should maintain the temperature above this setpoint. Alexa includes this field for dual-setpoint thermostats. | Temperature object | No |
upperSetpoint | Thermostat should maintain the temperature below this setpoint. Alexa includes this field for dual-setpoint thermostats. | Temperature object | No |
holdUntil | Duration of time that the thermostat should maintain the specified setpoints. Apply the new setpoints for the duration specified. Alexa includes this field if the user specifies it and you indicated that you support it in your discovery response. | TimeInterval object | No |
SetTargetTemperature response
If you handle aSetTargetTemperature directive successfully, respond with an Alexa.Response event. In the context object, include the values of all relevant properties.
The following example shows a SetTargetTemperature response for a single-setpoint thermostat.
Single-setpoint thermostat example
Single-setpoint thermostat example
SetTargetTemperature response for a dual-setpoint thermostat.
Dual-setpoint thermostat example
Dual-setpoint thermostat example
SetTargetTemperature directive error handling
If you can’t handle aSetTargetTemperature directive successfully, respond with an Alexa.ThermostatController.ErrorResponse event. You can also respond with a generic Alexa.ErrorResponse event if your error isn’t specific to temperature or thermostats.
AdjustTargetTemperature directive
Support theAdjustTargetTemperature directive so that users can adjust the temperature that they want a thermostat to maintain.
The following examples show user utterances:
- Dutch
- English (All)
- French (All)
- German
- Hindi
- Italian
- Japanese
- Portuguese
- Spanish (All)
AdjustTargetTemperature directive example
The following example shows anAdjustTargetTemperature directive that Alexa sends to your add-on.
AdjustTargetTemperature directive payload
| Field | Description | Type |
|---|---|---|
targetSetpointDelta | Amount by which to change the temperature. The amount can be positive or negative. | Temperature object |
AdjustTargetTemperature response
If you handle anAdjustTargetTemperature directive successfully, respond with an Alexa.Response event. A successful response confirms that the endpoint completed the requested action. In the context object, include the values of all relevant properties.
The following example shows an AdjustTargetTemperature response for a single-setpoint thermostat.
AdjustTargetTemperature directive error handling
If you can’t handle anAdjustTargetTemperature directive successfully, respond with an Alexa.ThermostatController.ErrorResponse event. You can also respond with a generic Alexa.ErrorResponse event if your error isn’t specific to temperature or thermostats.
SetThermostatMode directive
Support theSetThermostatMode directive so that users can set the mode of a device. The user must say,
SetThermostatMode directive example
The following example shows aSetThermostatMode directive that Alexa sends to your add-on.
SetThermostatMode directive payload
| Field | Description | Type |
|---|---|---|
thermostatMode | Heating and cooling modes for a thermostat. | Object |
thermostatMode.value | Mode to set for the thermostat. For valid values, see ThermostatMode. | String |
SetThermostatMode response event
If you handle aSetThermostatMode directive successfully, respond with an Alexa.Response event. A successful response confirms that the endpoint completed the requested action. In the context object, include the values of all relevant properties.
The following example shows a SetThermostatMode response.
SetThermostatMode directive error handling
If you can’t handle aSetThermostatMode directive successfully, respond with an Alexa.ThermostatController.ErrorResponse event. You can also respond with a generic Alexa.ErrorResponse event if your error isn’t specific to temperature or thermostats.
ResumeSchedule directive
Support theResumeSchedule directive so that users can resume the programmed schedule on the thermostat after they overrode the schedule. For example, a user might use the vacation override when they go away, and resume the normal program when they return.
The following example shows a user utterance:
- English (US)
ResumeSchedule directive example
The following example shows aResumeSchedule directive that Alexa sends to your add-on to resume the thermostat schedule.
ResumeSchedule directive payload
TheResumeSchedule directive doesn’t define a payload.
ResumeSchedule response
If you handle aResumeSchedule directive successfully, respond with an Alexa.Response event. A successful response confirms that the endpoint completed the requested action. In the context object, include the values of all relevant properties.
The following example shows a ResumeSchedule response.
ResumeSchedule directive error handling
If you can’t handle aResumeSchedule directive successfully, respond with an Alexa.ThermostatController.ErrorResponse event. You can also respond with a generic Alexa.ErrorResponse event if your error isn’t specific to temperature or thermostats.
State reporting
Alexa sends aReportState directive to request information about the state of an endpoint. When Alexa sends a ReportState directive, you send a StateReport event in response. The response contains the current state of all retrievable properties in the context object. You identify your retrievable properties in your discovery response. For details about state reports, see Understand State and Change Reporting.
StateReport response example
The following example shows aStateReport response.
StateReport response example for an air conditioner
The following example shows aStateReport response for an air conditioner.
Change reporting
You send aChangeReport event to report changes proactively in the state of an endpoint. You identify the properties that you proactively report in your discovery response. For details about change reports, see Understand State and Change Reporting.
ChangeReport event example
The following example shows aChangeReport event.
ChangeReport air conditioner example
The following example shows aChangeReport event for an air conditioner.
Requiring user verification
When a user attempts to set a temperature or change the thermostat mode, you can optionally require the user to verify the action before Alexa performs it. To require user verification, specify which directives you require verification for in yourDiscover.Response. For details, see the verificationsRequired object and example for a thermostat that requires user verification.
The following example shows a sample conversation when you require user verification:
- English (All)
- Japanese

