Smart Home TemperatureSetting Trait Schema
action.devices.traits.TemperatureSetting
- This trait covers handling both temperature point and modes.
Device ATTRIBUTES
Devices with this trait may report the following
attributes as part of the SYNC
operation. To learn
more about handling SYNC
intents, see
Intent fulfillment.
Attributes | Type | Description |
---|---|---|
availableThermostatModes |
Required. Describes the thermostat modes this device can support. |
|
Supports one of the following: | ||
0
|
String |
Deprecated Comma-separated list of modes supported by this specific device. New integrations should use the |
1
|
Array |
List of modes supported by this specific device. |
[item, ...] |
String |
Name of the supported mode. Supported values:
|
thermostatTemperatureRange |
Object |
Contains two float values that indicate the supported temperature range for this device (in degrees Celsius). |
minThresholdCelsius |
Number |
Required. Minimum threshold of the temperature range. |
maxThresholdCelsius |
Number |
Required. Maximum threshold of the temperature range. |
thermostatTemperatureUnit |
String |
Required. The display unit the device is set to by default. Google reports temperature information using the display unit. Supported values:
|
bufferRangeCelsius |
Number |
(Default: Specifies the minimum offset between heat-cool setpoints in degrees Celsius, if |
commandOnlyTemperatureSetting |
Boolean |
(Default: Indicates if the device supports using one-way (true) or two-way (false) communication. Set this attribute to true if the device cannot respond to a QUERY intent or Report State for this trait. |
queryOnlyTemperatureSetting |
Boolean |
(Default: Required if the device supports query-only execution. This attribute indicates if the device can only be queried for state information, and cannot be controlled. |
Examples
Thermostat device that supports discrete heating and cooling
{ "availableThermostatModes": [ "off", "heat", "cool", "on" ], "thermostatTemperatureUnit": "F" }
Command-only thermostat device
{ "availableThermostatModes": [ "off", "heat", "cool", "on" ], "thermostatTemperatureUnit": "C", "commandOnlyTemperatureSetting": true, "queryOnlyTemperatureSetting": false }
Device STATES
Devices with this trait may report the following
states as part of the QUERY
operation. To learn
more about handling QUERY
intents, see
Intent fulfillment.
The payload contains one of the following:
States for fixed set point.
States | Type | Description |
---|---|---|
thermostatMode |
String |
Required. Current mode of the device, from the list of Supported values:
|
thermostatTemperatureAmbient |
Number |
Required. Current observed temperature, in degrees Celsius. |
thermostatTemperatureSetpoint |
Number |
Required. Current temperature set point (single target), in degrees Celsius. |
States for set point range.
States | Type | Description |
---|---|---|
thermostatMode |
String |
Required. Current mode of the device, from the list of Supported values:
|
thermostatTemperatureAmbient |
Number |
Required. Current observed temperature, in degrees Celsius. |
thermostatTemperatureSetpointHigh |
Number |
Required. Current high point if in |
thermostatTemperatureSetpointLow |
Number |
Required. Current low point if in |
Examples
What is the current device temperature?
{ "activeThermostatMode": "cool", "thermostatMode": "cool", "thermostatTemperatureSetpoint": 23, "thermostatTemperatureAmbient": 25.1 }
What is the current device temperature?
{ "activeThermostatMode": "none", "thermostatMode": "heatcool", "thermostatTemperatureSetpointHigh": 26, "thermostatTemperatureSetpointLow": 22, "thermostatTemperatureAmbient": 25.1 }
Device COMMANDS
Devices with this trait may respond to the following
commands as part of the EXECUTE
operation. To learn
more about handling EXECUTE
intents, see
Intent fulfillment.
action.devices.commands.ThermostatTemperatureSetpoint
Set the target temperature for a thermostat device.
Parameters
Parameters | Type | Description |
---|---|---|
thermostatTemperatureSetpoint |
Number |
Required. Target temperature setpoint. Supports up to one decimal place. |
Examples
Set the device temperature to 22 degrees.
{ "command": "action.devices.commands.ThermostatTemperatureSetpoint", "params": { "thermostatTemperatureSetpoint": 22 } }
Related errors
An error occurred setting the target temperature.
Supported values:
alreadyAtMax
alreadyAtMin
targetAlreadyReached
valueOutOfRange
action.devices.commands.ThermostatTemperatureSetRange
Set a target temperature range for a thermostat device.
This command requires the following attributes:{ "availableThermostatModes": [ "heatcool" ] }
Parameters
Parameters | Type | Description |
---|---|---|
thermostatTemperatureSetpointHigh |
Number |
Required. High target setpoint for the range. Requires |
thermostatTemperatureSetpointLow |
Number |
Required. Low target setpoint for the range. Requires |
Examples
Hold the temperature between 22 and 26 degrees.
{ "command": "action.devices.commands.ThermostatTemperatureSetRange", "params": { "thermostatTemperatureSetpointHigh": 26, "thermostatTemperatureSetpointLow": 22 } }
Related errors
An error occurred setting the target range.
Supported values:
alreadyAtMax
alreadyAtMin
lockedToRange
rangeTooClose
targetAlreadyReached
valueOutOfRange
action.devices.commands.ThermostatSetMode
Set the target operating mode for a thermostat device.
Parameters
Parameters | Type | Description |
---|---|---|
thermostatMode |
String |
Required. Target mode, from the list of Supported values:
|
Examples
Set the device to heatcool mode.
{ "command": "action.devices.commands.ThermostatSetMode", "params": { "thermostatMode": "heatcool" } }
Related errors
An error occurred setting the target mode.
Supported values:
inAutoMode
inAwayMode
inDryMode
inEcoMode
inFanOnlyMode
inHeatOrCool
inHumidifierMode
inOffMode
inPurifierMode
action.devices.commands.TemperatureRelative
Adjust the target temperature relative to the current state.
This command requires the following attributes:{ "commandOnlyTemperatureSetting": true }
Parameters
The payload contains one of the following:
Adjust by degree.
Parameters | Type | Description |
---|---|---|
thermostatTemperatureRelativeDegree |
Number |
Required. The exact number of degrees for the temperature to change (for example, "Turn down 5 degrees"). |
Adjust by weight.
Parameters | Type | Description |
---|---|---|
thermostatTemperatureRelativeWeight |
Integer |
Required. This indicates the amount of ambiguous temperature change from a small amount ("Turn down a little"), to a large amount ("A lot warmer"). |
Examples
Increase temperature 5 degrees
{ "command": "action.devices.commands.TemperatureRelative", "params": { "thermostatTemperatureRelativeDegree": 5 } }
Decrease the temperature a lot
{ "command": "action.devices.commands.TemperatureRelative", "params": { "thermostatTemperatureRelativeWeight": -5 } }
Related errors
An error occurred adjusting the temperature.
Supported values:
alreadyAtMax
alreadyAtMin
valueOutOfRange