Setting the Current HVAC and Fan Mode Settings

Learn how to configure the current climate settings on a thermostat.

Seam enables you to adjust the current heating and cooling settings on a smart thermostat, including the HVAC mode and its corresponding set points. It also enables you to configure the fan mode. This guide explains how to use the Seam API to perform these actions.

When you send a command to change a setting on a thermostat, it might take a while for Seam to confirm the success of the action. To handle this potential delay, Seam provides an action attempt object that tracks the status of the action, indicating whether the action was successful.

To ensure that the action has executed successfully, poll the status of the action attempt object using the Get Action Attempt request. Once Seam has successfully adjusted the thermostat setting, the status of the action attempt indicates success.


Current Climate Setting

The set of current heating, ventilation, and air conditioning (HVAC) settings on a thermostat includes the following:

To set the HVAC mode and set points, issue a thermostat heat, cool, heat_cool, or off request and include the desired set points in the body of the request. When you issue one of these commands, Seam sets the hvac_mode_setting accordingly.


Fan Mode

The fan mode includes the following options:

  • on: The fan continuously operates, ensuring air circulation, regardless of the heating or cooling demand.

  • auto: The fan activates only when heating or cooling is on, making this setting a more energy-efficient choice.

Seam supports a single ongoing fan mode setting.


Before You Begin

To confirm that Seam supports thermostat programming for your device, use Get Device or Get Thermostat to query the device and check its capabilities_supported property. Ensure that the capabilities_supported list includes thermostat. For more information, see Retrieving Individual Thermostats.


Process Overview

To configure and then verify a climate setting on a thermostat, perform the following steps:

1. Execute the Climate Setting Request

Issue one of the following requests:

Climate Setting RequestDescription

Set the thermostat to heat mode.

Set the thermostat to cool mode.

Set the thermostat to dual heat-cool (auto) mode.

Turn off the thermostat.

Set the fan mode to on or off.

The Seam API returns an action attempt (action_attempt object) that monitors the status of the action.

The following example issues a request to set a specific thermostat to heat mode with a heating set point of 20° C:

Request:

heat_request = seam.thermostats.heat(
  device = "518f692b-f865-4590-8c3e-3849e9984c75",
  heating_set_point_celsius = 20
)

pprint(heat_request)

Response:

ActionAttempt(action_attempt_id='97125745-15d9-4970-b5be-c34ec3ce1c81',
              action_type='SET_HEAT',
              status='success',
              result={},
              error=None)

2. Poll the Action Attempt to Verify the Setting Change

Use the action_attempt_id from the previous response to poll the associated action attempt using the Get Action Attempt request. When the setting modification completes successfully, the status of the action attempt changes to success.

Request:

pprint(seam.action_attempts.get(action_attempt="4df7eb09-e17d-4d3a-a9c9-cfe718d3ce90"))

Response:

ActionAttempt(action_attempt_id='4df7eb09-e17d-4d3a-a9c9-cfe718d3ce90',
              action_type='SET_HEAT',
              status='success',
              result={},
              error=None)

Set the Current HVAC and Fan Mode Settings

The following sections describe how to se the current climate settings on a thermostat:

Set a Thermostat to Heat Mode

You can set a thermostat to operate in heating mode and specify a desired heating set point temperature. By establishing the set point, the thermostat activates the associated heating system to maintain the specified temperature.

Set the HVAC mode to heat by providing the device_id of the thermostat and the heating set point in Celsius or Fahrenheit.

Request:

heat_request = seam.thermostats.heat(
  device = "518f692b-f865-4590-8c3e-3849e9984c75",
  heating_set_point_celsius = 20
)

pprint(heat_request)

Response:

ActionAttempt(action_attempt_id='97125745-15d9-4970-b5be-c34ec3ce1c81',
              action_type='SET_HEAT',
              status='success',
              result={},
              error=None)

Set a Thermostat to Cool Mode

You can set a thermostat to operate in cooling mode and specify a desired cooling set point temperature. By establishing the set point, the thermostat activates the associated cooling system to maintain the specified temperature.

Set the HVAC mode to cool by providing the device_id of the thermostat and the cooling set point in Celsius or Fahrenheit.

Request:

cool_request = seam.thermostats.cool(
  device = "518f692b-f865-4590-8c3e-3849e9984c75",
  cooling_set_point_celsius = 25
)

pprint(cool_request)

Response:

ActionAttempt(action_attempt_id='87478724-0e30-4fed-9f2a-456971b7b04f',
              action_type='SET_COOL',
              status='success',
              result={},
              error=None)

Set a Thermostat to Heat-Cool Mode

You can set a thermostat to operate in heat-cool (also known as "auto") mode and specify desired set point temperatures for both heating and cooling. By establishing the set points, the thermostat activates the associated heating and cooling systems as needed to maintain the specified temperature range.

Set the HVAC mode to heat_cool by providing the device_id of the thermostat and both the heating set point and the cooling set point in Celsius or Fahrenheit.

Request:

heat_and_cool_request = seam.thermostats.heat_cool(
  device = "518f692b-f865-4590-8c3e-3849e9984c75",
  heating_set_point_celsius = 20,
  cooling_set_point_celsius = 25
)

pprint(heat_and_cool_request)

Response:

ActionAttempt(action_attempt_id='8050ec59-7f29-4d0d-9842-dedaf304740d',
              action_type='SET_HEAT_COOL',
              status='success',
              result={},
              error=None)

Turn off Heating and Cooling

You can set a thermostat to operate in "off" mode, which deactivates the associated heating and cooling systems. In this state, the thermostat does not regulate indoor temperatures.

Set the HVAC mode to off by providing the device_id of the thermostat.

Request:

off_request = seam.thermostats.off(
  device = "518f692b-f865-4590-8c3e-3849e9984c75"
)

pprint(off_request)

Response:

ActionAttempt(action_attempt_id='ef94c8b2-3ff0-4e56-a97e-033ca07ba0fd',
              action_type='SET_THERMOSTAT_OFF',
              status='success',
              result={},
              error=None)

Set the Fan Mode

You can configure the fan associated with a thermostat to operate in either on or auto mode. In the on setting, the fan runs continuously, while in the auto setting, the fan operates based on temperature needs and system demands.

Set the fan mode by providing the device_id of the thermostat and specifying the desired fan mode setting.

Request:

fan_on_request = seam.thermostats.set_fan_mode(
  device = "518f692b-f865-4590-8c3e-3849e9984c75",
  fan_mode = "on"
)

pprint(fan_on_request)

Response:

ActionAttempt(action_attempt_id='9c9b584b-c645-4ce0-a9c2-79b6f1db2396',
              action_type='SET_FAN_MODE',
              status='success',
              result={},
              error=None)

Last updated

Logo

© Seam Labs, Inc. All rights reserved.