Sets the for a specified .
POST /thermostats/set_hvac_mode ⇒ { action_attempt }
Authentication Methods
Personal access token
Must also include the seam-workspace
header in the request.
To learn more, see .
Request Parameters
device_id
String (Required)
ID of the thermostat device for which you want to set the HVAC mode.
hvac_mode_setting
String (Required)
cooling_set_point_celsius
Number
Desired in °C. You must set one of the cooling_set_point
parameters.
cooling_set_point_fahrenheit
Number
heating_set_point_celsius
Number
heating_set_point_fahrenheit
Number
Response
SET_HVAC_MODE
{
action_attempt_id: [example value],
action_type: [example value],
error: [example value],
result: [example value],
status: [example value]
}
Examples
Set HVAC mode
Specify the desired heating and cooling set points in °C or °F.
Code
await seam.thermostats.setHvacMode({
device_id: "123e4567-e89b-12d3-a456-426614174000",
hvac_mode_setting: "heat_cool",
heating_set_point_celsius: 20,
cooling_set_point_celsius: 25,
});
Output
{
"action_attempt_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "success",
"action_type": "SET_HVAC_MODE"
}
Code
seam.thermostats.set_hvac_mode(
device_id="123e4567-e89b-12d3-a456-426614174000",
hvac_mode_setting="heat_cool",
heating_set_point_celsius=20,
cooling_set_point_celsius=25,
)
Output
ActionAttempt(
action_attempt_id="123e4567-e89b-12d3-a456-426614174000",
status="success",
action_type="SET_HVAC_MODE",
)
Code
seam.thermostats.set_hvac_mode(
device_id: "123e4567-e89b-12d3-a456-426614174000",
hvac_mode_setting: "heat_cool",
heating_set_point_celsius: 20,
cooling_set_point_celsius: 25,
)
Output
{
"action_attempt_id" => "123e4567-e89b-12d3-a456-426614174000",
"status" => "success",
"action_type" => "SET_HVAC_MODE",
}
Code
<?php
$seam->thermostats->set_hvac_mode(
device_id: "123e4567-e89b-12d3-a456-426614174000",
hvac_mode_setting: "heat_cool",
heating_set_point_celsius: 20,
cooling_set_point_celsius: 25
);
Output
<?php
[
"action_attempt_id" => "123e4567-e89b-12d3-a456-426614174000",
"status" => "success",
"action_type" => "SET_HVAC_MODE",
];
Code
seam thermostats set-hvac-mode --device_id "123e4567-e89b-12d3-a456-426614174000" --hvac_mode_setting "heat_cool" --heating_set_point_celsius 20 --cooling_set_point_celsius 25
Output
{
"action_attempt_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "success",
"action_type": "SET_HVAC_MODE"
}
Code
package main
import api "github.com/seamapi/go"
func main() {
client.Thermostats.SetHvacMode(
context.Background(),
api.ThermostatsSetHvacModeRequest{
DeviceId: api.String("123e4567-e89b-12d3-a456-426614174000"),
HvacModeSetting: api.String("heat_cool"),
HeatingSetPointCelsius: api.Float64(20),
CoolingSetPointCelsius: api.Float64(25),
},
)
}
Output
api.ActionAttempt{ActionAttemptId: "123e4567-e89b-12d3-a456-426614174000", Status: "success", ActionType: "SET_HVAC_MODE"}
Code
curl --include --request POST "https://connect.getseam.com/thermostats/set_hvac_mode" \
--header "Authorization: Bearer $SEAM_API_KEY" \
--json @- <<EOF
{
"device_id": "123e4567-e89b-12d3-a456-426614174000",
"hvac_mode_setting": "heat_cool",
"heating_set_point_celsius": 20,
"cooling_set_point_celsius": 25
}
EOF
Output
{
"action_attempt": {
"action_attempt_id": "123e4567-e89b-12d3-a456-426614174000",
"status": "success",
"action_type": "SET_HVAC_MODE"
}
}