ReferenceHTTP API
climateControl
The climateControl router: 9 methods of the climate-control capability, with tier, scope, input and output.
Capability climate-control · scope device · mode singleton · source packages/types/src/capabilities/climate-control.cap.ts:162.
Every method is called at /trpc/climateControl.<method> — queries with GET, mutations with POST. See How to call and Authorization. Device methods take deviceId in their input.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
getStatus | query | protected | view | yes |
setMode | mutation | protected | create | yes |
setTarget | mutation | protected | create | yes |
setTargetRange | mutation | protected | create | yes |
setTargetHumidity | mutation | protected | create | yes |
setFanMode | mutation | protected | create | yes |
setPreset | mutation | protected | create | yes |
setSwingVertical | mutation | protected | create | yes |
setSwingHorizontal | mutation | protected | create | yes |
climateControl.getStatus
- Kind: query —
GET /trpc/climateControl.getStatus(added by the framework) - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityclimate-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=climateControl.getStatuson your hub
Input
{ deviceId: number }Output
ClimateControlStatusSchemaShapes: ClimateControlStatusSchema
climateControl.setMode
- Kind: mutation —
POST /trpc/climateControl.setMode - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityclimate-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=climateControl.setModeon your hub
Input
{ deviceId: number; mode: HvacModeSchema }Output
voidShapes: HvacModeSchema
climateControl.setTarget
- Kind: mutation —
POST /trpc/climateControl.setTarget - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityclimate-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=climateControl.setTargeton your hub
Input
{ deviceId: number; target: number }Output
voidclimateControl.setTargetRange
- Kind: mutation —
POST /trpc/climateControl.setTargetRange - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityclimate-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=climateControl.setTargetRangeon your hub
Input
{ deviceId: number; targetLow: number; targetHigh: number }Output
voidclimateControl.setTargetHumidity
- Kind: mutation —
POST /trpc/climateControl.setTargetHumidity - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityclimate-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=climateControl.setTargetHumidityon your hub
Input
{ deviceId: number; targetHumidity: number }Output
voidclimateControl.setFanMode
- Kind: mutation —
POST /trpc/climateControl.setFanMode - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityclimate-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=climateControl.setFanModeon your hub
Input
{ deviceId: number; fanMode: string }Output
voidclimateControl.setPreset
- Kind: mutation —
POST /trpc/climateControl.setPreset - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityclimate-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=climateControl.setPreseton your hub
Input
{ deviceId: number; preset: string }Output
voidclimateControl.setSwingVertical
- Kind: mutation —
POST /trpc/climateControl.setSwingVertical - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityclimate-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=climateControl.setSwingVerticalon your hub
Input
{ deviceId: number; on: boolean }Output
voidclimateControl.setSwingHorizontal
- Kind: mutation —
POST /trpc/climateControl.setSwingHorizontal - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityclimate-control, or categorydevice, or a device grant coveringdeviceId - Viewer: yes
- Try it: open
/system/api-explorer?method=climateControl.setSwingHorizontalon your hub
Input
{ deviceId: number; on: boolean }Output
void