githubEdit

Update a Thermostat Daily Program

Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program.

Updates a specified thermostat daily program.

Code:

await seam.thermostats.dailyPrograms.update({
  thermostat_daily_program_id: "6baf3a53-ba83-4052-8ea5-143584e18f03",
  name: "Weekday Program",
  periods: [
    { starts_at_time: "07:00:00", climate_preset_key: "Home" },
    { starts_at_time: "09:00:00", climate_preset_key: "Away" },
    { starts_at_time: "17:00:00", climate_preset_key: "Home" },
    { starts_at_time: "22:30:00", climate_preset_key: "Sleep" },
  ],
});

Output:

{
  "action_attempt_id": "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d",
  "action_type": "PUSH_THERMOSTAT_PROGRAMS",
  "error": null,
  "result": {},
  "status": "success"
}
chevron-rightAuthentication Methodshashtag
  • API key

  • Client session token

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

To learn more, see Authenticationarrow-up-right.

Request Parameters

name String (Required)

Name of the thermostat daily program that you want to update.


periods Array of Objects (Required)

Array of thermostat daily program periods. The periods that you specify overwrite any existing periods for the daily program.

chevron-rightclimate_preset_key Stringhashtag

Key of the climate preset to activate at the starts_at_time.


chevron-rightstarts_at_time Stringhashtag

Time at which the thermostat daily program period starts, in ISO 8601arrow-up-right format.


thermostat_daily_program_id String (Required)

ID of the thermostat daily program that you want to update.


Response

circle-check

Last updated

Was this helpful?