Create a Thermostat Schedule

Creates a thermostat schedule for a specified thermostat.

Code

Specify the device_id of the desired thermostat and the climate_preset_key of the desired climate preset, as well as the desired starts_at and ends_at times.

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,
});

Output

{
  "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
}
Authentication Methods
  • API key

  • Client session token

  • Personal access token Must also include the seam-workspace header in the request.

To learn more, see Authentication.

Request Parameters

climate_preset_key String (Required)

Key of the climate preset to use for the thermostat schedule.


device_id String (Required)

ID of the desired thermostat device.


ends_at String (Required)

Date and time at which the thermostat schedule ends, in ISO 8601 format.


starts_at String (Required)

Date and time at which the thermostat schedule starts, in ISO 8601 format.


is_override_allowed Boolean

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 Number

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 String

User-friendly name to identify the thermostat schedule.


Response

thermostat_schedule


Examples

Last updated

Was this helpful?

Revision created

ci: Generate docs