Activates a specified for a specified .
POST /thermostats/activate_climate_preset ⇒ { action_attempt }
Authentication Methods
Personal access token
Must also include the seam-workspace
header in the request.
To learn more, see .
Request Parameters
climate_preset_key
String (Required)
Climate preset key of the climate preset that you want to activate.
device_id
String (Required)
ID of the thermostat device for which you want to activate a climate preset.
Response
ACTIVATE_CLIMATE_PRESET
{
action_attempt_id: [example value],
action_type: [example value],
error: [example value],
result: [example value],
status: [example value]
}
Examples
Activate a climate preset
Specify the device_id
of the desired thermostat and the climate_preset_key
of the desired climate preset.
Code
await seam.thermostats.activateClimatePreset({
device_id: "123e4567-e89b-12d3-a456-426614174000",
climate_preset_key: "occupied",
});
Output
{
"action_attempt_id": "05de2295-d1dc-4748-aae3-9931658bde20",
"status": "pending",
"action_type": "ACTIVATE_CLIMATE_PRESET"
}
Code
seam.thermostats.activate_climate_preset(
device_id="123e4567-e89b-12d3-a456-426614174000", climate_preset_key="occupied"
)
Output
ActionAttempt(
action_attempt_id="05de2295-d1dc-4748-aae3-9931658bde20",
status="pending",
action_type="ACTIVATE_CLIMATE_PRESET",
)
Code
seam.thermostats.activate_climate_preset(
device_id: "123e4567-e89b-12d3-a456-426614174000",
climate_preset_key: "occupied",
)
Output
{
"action_attempt_id" => "05de2295-d1dc-4748-aae3-9931658bde20",
"status" => "pending",
"action_type" => "ACTIVATE_CLIMATE_PRESET",
}
Code
<?php
$seam->thermostats->activate_climate_preset(
device_id: "123e4567-e89b-12d3-a456-426614174000",
climate_preset_key: "occupied"
);
Output
<?php
[
"action_attempt_id" => "05de2295-d1dc-4748-aae3-9931658bde20",
"status" => "pending",
"action_type" => "ACTIVATE_CLIMATE_PRESET",
];
Code
seam thermostats activate-climate-preset --device_id "123e4567-e89b-12d3-a456-426614174000" --climate_preset_key "occupied"
Output
{
"action_attempt_id": "05de2295-d1dc-4748-aae3-9931658bde20",
"status": "pending",
"action_type": "ACTIVATE_CLIMATE_PRESET"
}
Code
package main
import api "github.com/seamapi/go"
func main() {
client.Thermostats.ActivateClimatePreset(
context.Background(),
api.ThermostatsActivateClimatePresetRequest{
DeviceId: api.String("123e4567-e89b-12d3-a456-426614174000"),
ClimatePresetKey: api.String("occupied"),
},
)
}
Output
api.ActionAttempt{ActionAttemptId: "05de2295-d1dc-4748-aae3-9931658bde20", Status: "pending", ActionType: "ACTIVATE_CLIMATE_PRESET"}
Code
curl --include --request POST "https://connect.getseam.com/thermostats/activate_climate_preset" \
--header "Authorization: Bearer $SEAM_API_KEY" \
--json @- <<EOF
{
"device_id": "123e4567-e89b-12d3-a456-426614174000",
"climate_preset_key": "occupied"
}
EOF
Output
{
"action_attempt": {
"action_attempt_id": "05de2295-d1dc-4748-aae3-9931658bde20",
"status": "pending",
"action_type": "ACTIVATE_CLIMATE_PRESET"
}
}