Create a Thermostat Schedule
POST /thermostats/schedules/create ⇒ { thermostat_schedule }Creates a thermostat schedule for a specified thermostat.
Request
await seam.thermostats.schedules.create({
device_id: "123e4567-e89b-12d3-a456-426614174000",
name: "Reservation 1",
climate_preset_key: "occupied",
starts_at: "2024-11-01T15:00:00Z",
ends_at: "2024-11-05T12:00:00Z",
max_override_period_minutes: 90,
});Response
{
"thermostat_schedule_id": "56d29fcf-0674-4db5-8e03-b2370a77460a",
"name": "Reservation 1",
"device_id": "2d488679-6f07-4810-aed2-e726872c1dd5",
"climate_preset_key": "occupied",
"starts_at": "2024-11-01T15:00:00.000Z",
"ends_at": "2024-11-05T12:00:00.000Z",
"max_override_period_minutes": 90
}Request
seam.thermostats.schedules.create(
device_id="123e4567-e89b-12d3-a456-426614174000",
name="Reservation 1",
climate_preset_key="occupied",
starts_at="2024-11-01T15:00:00Z",
ends_at="2024-11-05T12:00:00Z",
max_override_period_minutes=90,
)Response
ThermostatSchedule(
thermostat_schedule_id="56d29fcf-0674-4db5-8e03-b2370a77460a",
name="Reservation 1",
device_id="2d488679-6f07-4810-aed2-e726872c1dd5",
climate_preset_key="occupied",
starts_at="2024-11-01T15:00:00.000Z",
ends_at="2024-11-05T12:00:00.000Z",
max_override_period_minutes=90,
)Request
seam.thermostats.schedules.create(
device_id: "123e4567-e89b-12d3-a456-426614174000",
name: "Reservation 1",
climate_preset_key: "occupied",
starts_at: "2024-11-01T15:00:00Z",
ends_at: "2024-11-05T12:00:00Z",
max_override_period_minutes: 90,
)Response
{
"thermostat_schedule_id" => "56d29fcf-0674-4db5-8e03-b2370a77460a",
"name" => "Reservation 1",
"device_id" => "2d488679-6f07-4810-aed2-e726872c1dd5",
"climate_preset_key" => "occupied",
"starts_at" => "2024-11-01T15:00:00.000Z",
"ends_at" => "2024-11-05T12:00:00.000Z",
"max_override_period_minutes" => 90,
}Request
<?php
$seam->thermostats->schedules->create(
device_id: "123e4567-e89b-12d3-a456-426614174000",
name: "Reservation 1",
climate_preset_key: "occupied",
starts_at: "2024-11-01T15:00:00Z",
ends_at: "2024-11-05T12:00:00Z",
max_override_period_minutes: 90
);Response
<?php
[
"thermostat_schedule_id" => "56d29fcf-0674-4db5-8e03-b2370a77460a",
"name" => "Reservation 1",
"device_id" => "2d488679-6f07-4810-aed2-e726872c1dd5",
"climate_preset_key" => "occupied",
"starts_at" => "2024-11-01T15:00:00.000Z",
"ends_at" => "2024-11-05T12:00:00.000Z",
"max_override_period_minutes" => 90,
];Request
seam thermostats schedules create --device_id "123e4567-e89b-12d3-a456-426614174000" --name "Reservation 1" --climate_preset_key "occupied" --starts_at "2024-11-01T15:00:00Z" --ends_at "2024-11-05T12:00:00Z" --max_override_period_minutes 90Response
{
"thermostat_schedule_id": "56d29fcf-0674-4db5-8e03-b2370a77460a",
"name": "Reservation 1",
"device_id": "2d488679-6f07-4810-aed2-e726872c1dd5",
"climate_preset_key": "occupied",
"starts_at": "2024-11-01T15:00:00.000Z",
"ends_at": "2024-11-05T12:00:00.000Z",
"max_override_period_minutes": 90
}Request
package main
import api "github.com/seamapi/go"
import schedules "github.com/seamapi/go/schedules"
func main() {
client.Thermostats.Schedules.Create(
context.Background(),
schedules.SchedulesCreateRequest{
DeviceId: api.String("123e4567-e89b-12d3-a456-426614174000"),
Name: api.String("Reservation 1"),
ClimatePresetKey: api.String("occupied"),
StartsAt: api.String("2024-11-01T15:00:00Z"),
EndsAt: api.String("2024-11-05T12:00:00Z"),
MaxOverridePeriodMinutes: api.Float64(90),
},
)
}Response
api.ThermostatSchedule{ThermostatScheduleId: "56d29fcf-0674-4db5-8e03-b2370a77460a", Name: "Reservation 1", DeviceId: "2d488679-6f07-4810-aed2-e726872c1dd5", ClimatePresetKey: "occupied", StartsAt: "2024-11-01T15:00:00.000Z", EndsAt: "2024-11-05T12:00:00.000Z", MaxOverridePeriodMinutes: 90}Authentication Methods
API key
Client session token
Personal access token Must also include the
seam-workspaceheader in the request.
Request Parameters
climate_preset_key
climate_preset_keyType: string Required: Yes
Key of the climate preset to use for the thermostat schedule.
device_id
device_idType: string Required: Yes
ID of the desired thermostat device.
ends_at
ends_atType: string Required: Yes
Date and time at which the thermostat schedule ends, in ISO 8601 format.
is_override_allowed
is_override_allowedType: boolean Required: No
Indicates whether a person at the thermostat or using the API can change the thermostat's settings while the schedule is active. See also Specifying Manual Override Permissions.
max_override_period_minutes
max_override_period_minutesType: number Required: No
Number of minutes for which a person at the thermostat or using the API can change the thermostat's settings after the activation of the scheduled climate preset. See also Specifying Manual Override Permissions.
name
nameType: string Required: No
User-friendly name to identify the thermostat schedule.
starts_at
starts_atType: string Required: Yes
Date and time at which the thermostat schedule starts, in ISO 8601 format.
Return Type
Last updated
Was this helpful?

