Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions docs/classes/Seam.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion docs/modules.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/seam-connect/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import {
EventGetRequest,
ClientSessionsGetRequest,
ThermostatSetFanModeRequest,
ThermostatCoolRequest,
ThermostatHeatRequest,
} from "../types/route-requests"
import {
Expand Down Expand Up @@ -624,6 +625,12 @@ export abstract class Routes {
method: "POST",
data: params,
}),
cool: (params: ThermostatCoolRequest) =>
this.createActionAttemptAndWait({
url: "/thermostats/cool",
method: "POST",
data: params,
}),
heat: (params: ThermostatHeatRequest) =>
this.createActionAttemptAndWait({
url: "/thermostats/heat",
Expand Down
7 changes: 7 additions & 0 deletions src/types/route-requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,13 @@ export type ThermostatSetFanModeRequest = {
fan_mode_setting: FanModeSetting
}

export type ThermostatCoolRequest = {
device_id: string
sync?: boolean
cooling_set_point_celsius?: number
cooling_set_point_fahrenheit?: number
}

export type ThermostatHeatRequest = {
device_id: string
sync?: boolean
Expand Down
14 changes: 14 additions & 0 deletions tests/routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,20 @@ test(
},
"{}"
)
test(
testAPIMethod("thermostats.cool"),
{
args: (seed) => [
{
device_id: seed.devices.nest.id1,
cooling_set_point_fahrenheit: 60,
},
],
load_devices_from: ["nest"],
modifiesState: true,
},
"{}"
)
test(
testAPIMethod("thermostats.climateSettingSchedules.get"),
{
Expand Down