Update a Thermostat

Updates a thermostat by setting the values of the parameters passed. Any parameters not provides are left unchanged.

The primary attribute you can modify is the default climate setting. The default climate setting determines the configuration of the thermostat when a climate setting schedule ends. This differs from the current climate setting of the thermostat, which represent the active programming on the device.

Code Example

seam.thermostats.update(
  device_id: "a83690b2-2b70-409a-9a94-426699b84c97",
  default_climate_setting: {
    "automatic_cooling_enabled": true,
    "automatic_heating_enabled": true,
    "cooling_set_point_fahrenheit": 70
    "heating_set_point_fahrenheit": 65
  }
)

# <Seam::ActionAttempt:0x008f6b0                                                         
#   status="success"                                                                     
#   action_type="UPDATE_THERMOSTAT"
#   action_attempt_id="4c3f9e12-5c9e-474e-92c4-719f72e13496"
#   result={}>

Parameters

device_id

String

Device ID

default_climate_setting

Default climate setting when no climate setting schedules are in place.

Response

This section shows the JSON response returned by the API. Since each language encapsulates this response inside objects specific to that language and/or implementation, the actual type in your language might differ from what’s written here.

JSON format

{
  "action_attempt": {
    "status": "pending",
    "action_type": "UPDATE_THERMOSTAT",
    "action_attempt_id": "4a11bcaf-c930-41d8-85f0-be375c93096f",
    "result": null,
    "error": null
  },
  "ok": true
}

status

"success" | "error" | "pending"

success determines a completed action performed on the device. error determines an unsuccessful action performed on the device. pending determines Seam is still trying to perform the action on the device

action_type

"UPDATE_THERMOSTAT"

Determines the type of action performed on the device

action_attempt_id

String

ID of the action attempt

result

String

result only exists for the success status describing the event

error

Object

error only exists for the error status describing the event. It is an object with type and message. Where type determines type of error and message describes the error

Last updated

Logo

Β© Seam Labs, Inc. All rights reserved.