Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add thermostat code samples #386

Merged
merged 12 commits into from
Oct 30, 2024
6 changes: 0 additions & 6 deletions docs/api/_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,7 @@ These items are deprecated.
- `/thermostats/cool`
- `/thermostats/create_climate_preset`
- `/thermostats/delete_climate_preset`
- `/thermostats/get`
- `/thermostats/heat`
- `/thermostats/heat_cool`
- `/thermostats/list`
- `/thermostats/off`
- `/thermostats/set_fallback_climate_preset`
- `/thermostats/set_fan_mode`
- `/thermostats/update_climate_preset`
- `/thermostats/schedules/create`
- `/thermostats/schedules/delete`
Expand Down
152 changes: 152 additions & 0 deletions src/data/code-sample-definitions/acs-entrances.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
---
- title: List thermostats
description: To filter the list of returned thermostats, specify the desired parameters.
request:
path: /thermostats/list
response:
body:
thermostats:
- device_id: 123e4567-e89b-12d3-a456-426614174000
device_type: 'ecobee_thermostat'
capabilities_supported:
- thermostat
properties:
name: 'Entryway'
online: true,
relative_humidity: 0.36
temperature_farenheit: 70
available_hvac_mode_settings:
- cool
- heat
- heat_cool
- off
current_climate_setting:
hvac_mode_setting: heat_cool
cooling_set_point_farenheit: 75
heating_set_point_farenheit: 65
manual_override_allowed: false
location: null
connected_account_id: 123e4567-e89b-12d3-a456-426614174000
workspace_id: 123e4567-e89b-12d3-a456-426614174000
created_at: '2024-04-05T07:57:05.323Z'
razor-x marked this conversation as resolved.
Show resolved Hide resolved
devices:
DebbieAtSeam marked this conversation as resolved.
Show resolved Hide resolved
- device_id: 123e4567-e89b-12d3-a456-426614174000
device_type: 'ecobee_thermostat'
capabilities_supported:
- thermostat
properties:
name: 'Entryway'
online: true,
relative_humidity: 0.36
temperature_farenheit: 70
available_hvac_mode_settings:
- cool
- heat
- heat_cool
- off
current_climate_setting:
hvac_mode_setting: heat_cool
cooling_set_point_farenheit: 75
heating_set_point_farenheit: 65
manual_override_allowed: false
location: null
connected_account_id: 123e4567-e89b-12d3-a456-426614174000
workspace_id: 123e4567-e89b-12d3-a456-426614174000
created_at: '2024-04-05T07:57:05.323Z'
- title: Get a thermostat
description: Specify the `device_id` of the thermostat that you want to retrieve.
request:
path: /thermostats/get
parameters:
device_id: 123e4567-e89b-12d3-a456-426614174000
response:
body:
thermostat:
- device_id: 123e4567-e89b-12d3-a456-426614174000
device_type: 'ecobee_thermostat'
capabilities_supported:
- thermostat
properties:
name: 'Entryway'
online: true,
relative_humidity: 0.36
temperature_farenheit: 70
available_hvac_mode_settings:
- cool
- heat
- heat_cool
- off
current_climate_setting:
hvac_mode_setting: heat_cool
cooling_set_point_farenheit: 75
heating_set_point_farenheit: 65
manual_override_allowed: false
location: null
connected_account_id: 123e4567-e89b-12d3-a456-426614174000
workspace_id: 123e4567-e89b-12d3-a456-426614174000
created_at: '2024-04-05T07:57:05.323Z'
razor-x marked this conversation as resolved.
Show resolved Hide resolved
- title: Set to heat mode
description: Specify the desired heating set point in Celsius or Fahrenheit.
request:
path: /thermostats/heat
parameters:
device_id: 123e4567-e89b-12d3-a456-426614174000
heating_set_point_celsius: 25
response:
body:
action_attempt:
action_attempt_id: 123e4567-e89b-12d3-a456-426614174000
status: pending
action_type: SET_HEAT
- title: Set to cool mode
description: Specify the desired cooling set point in Celsius or Fahrenheit.
request:
path: /thermostats/cool
parameters:
device_id: 123e4567-e89b-12d3-a456-426614174000
cooling_set_point_celsius: 25
response:
body:
action_attempt:
action_attempt_id: 123e4567-e89b-12d3-a456-426614174000
status: pending
action_type: SET_COOL
- title: Set to heat-cool (auto) mode
description: Specify the desired heating set point in Celsius or Fahrenheit.
request:
path: /thermostats/heat_cool
parameters:
device_id: 123e4567-e89b-12d3-a456-426614174000
cooling_set_point_celsius: 25
heating_set_point_celsius: 20
response:
body:
action_attempt:
action_attempt_id: 123e4567-e89b-12d3-a456-426614174000
status: pending
action_type: SET_HEAT_COOL
- title: Set to off mode
description: Specify the `device_id` of the thermostat that you want to set to off mode.
request:
path: /thermostats/off
parameters:
device_id: 123e4567-e89b-12d3-a456-426614174000
response:
body:
action_attempt:
action_attempt_id: 123e4567-e89b-12d3-a456-426614174000
status: pending
action_type: SET_THERMOSTAT_OFF
- title: Set fan mode setting
description: Specify the desired fan mode setting.
request:
path: /thermostats/set_fan_mode
parameters:
device_id: 123e4567-e89b-12d3-a456-426614174000
fan_mode_setting: 'auto'
response:
body:
action_attempt:
action_attempt_id: 123e4567-e89b-12d3-a456-426614174000
status: pending
action_type: SET_FAN_MODE
Loading