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"
}Updates a specified thermostat daily program.
Code:
curl --include --request POST "https://connect.getseam.com/thermostats/daily_programs/update" \
--header "Authorization: Bearer $SEAM_API_KEY" \
--json @- <<EOF
{
"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"
}
]
}
EOFOutput:
{
"action_attempt": {
"action_attempt_id": "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d",
"action_type": "PUSH_THERMOSTAT_PROGRAMS",
"error": null,
"result": {},
"status": "success"
}
}Updates a specified thermostat daily program.
Code:
seam.thermostats.daily_programs.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:
ActionAttempt(
action_attempt_id="a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d",
action_type="PUSH_THERMOSTAT_PROGRAMS",
error=None,
result={},
status="success",
)Updates a specified thermostat daily program.
Code:
seam.thermostats.daily_programs.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" => nil,
"result" => {
},
"status" => "success",
}Updates a specified thermostat daily program.
Code:
$seam->thermostats->daily_programs->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",
];Updates a specified thermostat daily program.
Code:
seam thermostats daily-programs 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"
}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.
thermostat_daily_program_id String (Required)
ID of the thermostat daily program that you want to update.
Response
{
"action_attempt_id": "a1b2c3d4-e5f6-4a3b-2c1d-0e9f8a7b6c5d",
"action_type": "PUSH_THERMOSTAT_PROGRAMS",
"error": null,
"result": {},
"status": "success"
}Last updated
Was this helpful?

