> ## Documentation Index
> Fetch the complete documentation index at: https://docs.seam.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating and Managing Climate Presets

> Learn how to create, list, update, and delete climate presets for thermostats.

You create a set of climate presets for each thermostat, customized for your—and your users'—needs. Each climate preset is a predefined configuration for a thermostat that specifies settings, such as HVAC mode, fan mode, and temperature set points. These presets make it quick and efficient for users to apply consistent climate settings tailored to different scenarios, enhancing both comfort and energy efficiency.

Once you create climate presets, you can [activate them](/api/thermostats/activate_climate_preset), add them to thermostat [schedules](../creating-and-managing-thermostat-schedules) and [programs](../creating-and-managing-thermostat-programs), and set them as the [fallback climate preset](/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset).

***

## Climate Preset Properties

Each climate preset can contain the following properties, depending on the [capabilities](/capability-guides/thermostats/index#thermostat-capabilities) of the thermostat:

<table>
  <thead>
    <tr>
      <th width="339">Property</th>
      <th>Description</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        <code>climate\_preset\_key</code>
      </td>

      <td>(Required) Key to identify the climate preset.</td>
    </tr>

    <tr>
      <td>
        <code>name</code>
      </td>

      <td>(Optional) User-friendly name to identify the climate preset.</td>
    </tr>

    <tr>
      <td>
        <code>fan\_mode\_setting</code>
      </td>

      <td>
        Desired fan mode setting, such as <code>on</code>, <code>auto</code>, or{' '}
        <code>circulate</code>.
      </td>
    </tr>

    <tr>
      <td>
        <code>hvac\_mode\_setting</code>
      </td>

      <td>
        Desired{' '}

        <a href="/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode">
          HVAC mode
        </a>

        {' '}

        setting, such as <code>heat</code>, <code>cool</code>,{' '}
        <code>heat\_cool</code>, or <code>off</code>.
      </td>
    </tr>

    <tr>
      <td>
        <code>cooling\_set\_point\_celsius</code>
      </td>

      <td>
        Temperature to which the thermostat should cool (in °C). See also{' '}

        <a href="/capability-guides/thermostats/understanding-thermostat-concepts/set-points">
          Set Points
        </a>

        .
      </td>
    </tr>

    <tr>
      <td>
        <code>cooling\_set\_point\_fahrenheit</code>
      </td>

      <td>Temperature to which the thermostat should cool (in °F).</td>
    </tr>

    <tr>
      <td>
        <code>heating\_set\_point\_celsius</code>
      </td>

      <td>Temperature to which the thermostat should heat (in °C).</td>
    </tr>

    <tr>
      <td>
        <code>heating\_set\_point\_fahrenheit</code>
      </td>

      <td>Temperature to which the thermostat should heat (in °F).</td>
    </tr>

    <tr>
      <td>
        <del>
          <code>manual\_override\_allowed</code>
        </del>
      </td>

      <td>
        (Optional) Indicates whether a person at the thermostat or using the API
        can change the thermostat's settings.

        <br />

        <br />

        Deprecated. Use <code>thermostat\_schedule.is\_override\_allowed</code>{' '}
        instead.
      </td>
    </tr>

    <tr>
      <td>
        <code>can\_edit</code>
      </td>

      <td>
        Indicates whether the climate preset can be edited. There are some cases
        in which Seam syncs in climate presets (from the device) that cannot be
        modified.
      </td>
    </tr>

    <tr>
      <td>
        <code>can\_delete</code>
      </td>

      <td>
        Indicates whether the climate preset can be deleted. There are some
        cases in which Seam syncs in climate presets (from the device) that
        cannot be deleted.
      </td>
    </tr>
  </tbody>
</table>

***

## Create a Climate Preset

To create a climate preset, issue a [`/thermostats/create_climate_preset`](/api/thermostats/create_climate_preset) request, providing the `device_id` of the desired thermostat. Also, include the desired settings for the climate preset and, optionally, a name.

The following example creates two climate presets with the keys `occupied` and `unoccupied`:

**Request:**

<CodeGroup>
  ```javascript JavaScript theme={null}
  // Get the thermostat.
  const thermostat = await seam.devices.get({
    device_id: '2d488679-6f07-4810-aed2-e726872c1dd5',
  })

  // Confirm that the thermostat supports heat_cool mode
  // so that the climate presets can use this mode.
  if (thermostat.can_hvac_heat_cool) {
    // Create the climate presets.
    await seam.thermostats.createClimatePreset({
      device_id: thermostat.device_id,
      climate_preset_key: 'occupied',
      name: 'Occupied',
      fan_mode_setting: 'auto',
      hvac_mode_setting: 'heat_cool',
      cooling_set_point_celsius: 25,
      heating_set_point_celsius: 20,
    })

    await seam.thermostats.createClimatePreset({
      device_id: thermostat.device_id,
      climate_preset_key: 'unoccupied',
      name: 'Unoccupied',
      fan_mode_setting: 'auto',
      hvac_mode_setting: 'heat_cool',
      cooling_set_point_celsius: 30,
      heating_set_point_celsius: 15,
    })
  }
  ```

  ```bash cURL theme={null}
  # Get the thermostat.
  thermostat=$(
    # Use GET or POST.
    curl -X 'GET' \
      'https://connect.getseam.com/devices/get' \
      -H 'accept: application/json' \
      -H "Authorization: Bearer ${SEAM_API_KEY}" \
      -H 'Content-Type: application/json' \
      -d '{
        "device_id": "2d488679-6f07-4810-aed2-e726872c1dd5"
    }')

  # Confirm that the thermostat supports heat_cool mode
  # so that the climate presets can use this mode.
  if  $(jq -r '.device.can_hvac_heat_cool' <<< ${thermostat}); then \
    # Create the climate presets.
    curl -X 'POST' \
      'https://connect.getseam.com/thermostats/create_climate_preset' \
      -H 'accept: application/json' \
      -H "Authorization: Bearer ${SEAM_API_KEY}" \
      -H 'Content-Type: application/json' \
      -d "{
        \"device_id\": \"$(jq -r '.device.device_id' <<< ${thermostat})\",
        \"climate_preset_key\": \"occupied\",
        \"name\": \"Occupied\",
        \"fan_mode_setting\": \"auto\",
        \"hvac_mode_setting\": \"heat_cool\",
        \"cooling_set_point_celsius\": 25,
        \"heating_set_point_celsius\": 20
    }";

    curl -X 'POST' \
      'https://connect.getseam.com/thermostats/create_climate_preset' \
      -H 'accept: application/json' \
      -H "Authorization: Bearer ${SEAM_API_KEY}" \
      -H 'Content-Type: application/json' \
      -d "{
        \"device_id\": \"$(jq -r '.device.device_id' <<< ${thermostat})\",
        \"climate_preset_key\": \"unoccupied\",
        \"name\": \"Unoccupied\",
        \"fan_mode_setting\": \"auto\",
        \"hvac_mode_setting\": \"heat_cool\",
        \"cooling_set_point_celsius\": 30,
        \"heating_set_point_celsius\": 15
    }";
  fi
  ```

  ```python Python theme={null}
  # Get the thermostat.
  thermostat = seam.devices.get(
    device_id = "2d488679-6f07-4810-aed2-e726872c1dd5"
  )

  # Confirm that the thermostat supports heat_cool mode
  # so that the climate presets can use this mode.
  if thermostat.can_hvac_heat_cool:
    # Create the climate presets.
    seam.thermostats.create_climate_preset(
      device_id = thermostat.device_id,
      climate_preset_key = "occupied",
      name = "Occupied",
      fan_mode_setting = "auto",
      hvac_mode_setting = "heat_cool",
      cooling_set_point_celsius = 25,
      heating_set_point_celsius = 20
    )

    seam.thermostats.create_climate_preset(
      device_id: thermostat.device_id,
      climate_preset_key = "unoccupied",
      name = "Unoccupied",
      fan_mode_setting = "auto",
      hvac_mode_setting = "heat_cool",
      cooling_set_point_celsius = 30,
      heating_set_point_celsius = 15
    )
  ```

  ```ruby Ruby theme={null}
  # Get the thermostat.
  thermostat = seam.devices.get(
    device_id: "2d488679-6f07-4810-aed2-e726872c1dd5"
  )

  # Confirm that the thermostat supports heat_cool mode
  # so that the climate presets can use this mode.
  if (thermostat.can_hvac_heat_cool)
    # Create the climate presets.
    seam.thermostats.create_climate_preset(
      device_id: thermostat.device_id,
      climate_preset_key: "occupied",
      name: "Occupied",
      fan_mode_setting: "auto",
      hvac_mode_setting: "heat_cool",
      cooling_set_point_celsius: 25,
      heating_set_point_celsius: 20
    )

    seam.thermostats.create_climate_preset(
      device_id: thermostat.device_id,
      climate_preset_key: "unoccupied",
      name: "Unoccupied",
      fan_mode_setting: "auto",
      hvac_mode_setting: "heat_cool",
      cooling_set_point_celsius: 30,
      heating_set_point_celsius: 15
    )
  end
  ```

  ```php PHP theme={null}
  // Get the thermostat.
  $thermostat = $seam->devices->get(
    device_id: "2d488679-6f07-4810-aed2-e726872c1dd5"
  );

  // Confirm that the thermostat supports heat_cool mode
  // so that the climate presets can use this mode.
  if ($thermostat->can_hvac_heat_cool) {
    // Create the climate presets.
    $seam->thermostats->create_climate_preset(
      device_id: $thermostat->device_id,
      climate_preset_key: "occupied",
      name: "Occupied",
      fan_mode_setting: "auto",
      hvac_mode_setting: "heat_cool",
      cooling_set_point_celsius: 25,
      heating_set_point_celsius: 20
    );

    $seam->thermostats->create_climate_preset(
      device_id: $thermostat->device_id,
      climate_preset_key: "unoccupied",
      name: "Unoccupied",
      fan_mode_setting: "auto",
      hvac_mode_setting: "heat_cool",
      cooling_set_point_celsius: 30,
      heating_set_point_celsius: 15
    );
  }
  ```

  ```csharp C# theme={null}
  // Coming soon!
  ```
</CodeGroup>

**Response:**

<CodeGroup>
  ```json JavaScript theme={null}
  void
  ```

  ```json cURL theme={null}
  {
    "ok": true
  }
  ```

  ```json Python theme={null}
  None
  ```

  ```json Ruby theme={null}
  nil
  ```

  ```json PHP theme={null}
  void
  ```

  ```json C# theme={null}
  // Coming soon!
  ```
</CodeGroup>

***

## List All Climate Presets for a Thermostat

To list climate presets for a thermostat, issue a [`/devices/get`](/api/devices/get) request, providing the `device_id` of the desired thermostat. Then, inspect the `available_climate_presets` property.

**Request:**

<CodeGroup>
  ```javascript JavaScript theme={null}
  await seam.devices.get({
    device_id: '2d488679-6f07-4810-aed2-e726872c1dd5',
  })
  ```

  ```bash cURL theme={null}
  # Use GET or POST.
  curl -X 'GET' \
    'https://connect.getseam.com/devices/get' \
    -H 'accept: application/json' \
    -H "Authorization: Bearer ${SEAM_API_KEY}" \
    -H 'Content-Type: application/json' \
    -d '{
    "device_id": "2d488679-6f07-4810-aed2-e726872c1dd5"
  }'
  ```

  ```python Python theme={null}
  seam.devices.get(
    device_id = "2d488679-6f07-4810-aed2-e726872c1dd5"
  )
  ```

  ```ruby Ruby theme={null}
  seam.devices.get(
    device_id: "2d488679-6f07-4810-aed2-e726872c1dd5"
  )
  ```

  ```php PHP theme={null}
  $seam->devices->get(
    device_id: "2d488679-6f07-4810-aed2-e726872c1dd5"
  );
  ```

  ```csharp C# theme={null}
  // Coming soon!
  ```
</CodeGroup>

**Response:**

<CodeGroup>
  ```json JavaScript theme={null}
  {
    device_id: '2d488679-6f07-4810-aed2-e726872c1dd5',
    properties: {
      available_climate_presets: [
        {
          climate_preset_key: 'occupied',
          name: 'Occupied',
          display_name: 'Occupied',
          fan_mode_setting: 'auto',
          hvac_mode_setting: 'heat_cool',
          cooling_set_point_celsius: 25,
          heating_set_point_celsius: 20,
          cooling_set_point_fahrenheit: 77,
          heating_set_point_fahrenheit: 68,
          ...
        },
        {
          climate_preset_key: 'unoccupied',
          name: 'Unoccupied',
          display_name: 'Unoccupied',
          fan_mode_setting: 'auto',
          hvac_mode_setting: 'heat_cool',
          cooling_set_point_celsius: 30,
          heating_set_point_celsius: 15,
          cooling_set_point_fahrenheit: 86,
          heating_set_point_fahrenheit: 59,
          ...
        }
      ],
      ...
    },
    ...
  }
  ```

  ```json cURL theme={null}
  {
    "device": {
      "device_id": "2d488679-6f07-4810-aed2-e726872c1dd5",
      "properties": {
        "available_climate_presets": [
          {
            "climate_preset_key": "occupied",
            "name": "Occupied",
            "display_name": "Occupied",
            "fan_mode_setting": "auto",
            "hvac_mode_setting": "heat_cool",
            "cooling_set_point_celsius": 25,
            "heating_set_point_celsius": 20,
            "cooling_set_point_fahrenheit": 77,
            "heating_set_point_fahrenheit": 68,
            ...
          },
          {
            "climate_preset_key": "unoccupied",
            "name": "Unoccupied",
            "display_name": "Unoccupied",
            "fan_mode_setting": "auto",
            "hvac_mode_setting": "heat_cool",
            "cooling_set_point_celsius": 30,
            "heating_set_point_celsius": 15,
            "cooling_set_point_fahrenheit": 86,
            "heating_set_point_fahrenheit": 59,
            ...
          }
        ],
        ...
      },
      ...
    },
    "ok": true
  }
  ```

  ```json Python theme={null}
  Device(
    device_id='2d488679-6f07-4810-aed2-e726872c1dd5',
    properties={
      'available_climate_presets': [
        {
          'climate_preset_key': 'occupied',
          'cooling_set_point_celsius': 25,
          'cooling_set_point_fahrenheit': 77,
          'display_name': 'Occupied',
          'fan_mode_setting': 'auto',
          'heating_set_point_celsius': 20,
          'heating_set_point_fahrenheit': 68,
          'hvac_mode_setting': 'heat_cool',
          'name': 'Occupied',
          ...
        },
        {
          'climate_preset_key': 'unoccupied',
          'cooling_set_point_celsius': 30,
          'cooling_set_point_fahrenheit': 86,
          'display_name': 'Unoccupied',
          'fan_mode_setting': 'auto',
          'heating_set_point_celsius': 15,
          'heating_set_point_fahrenheit': 59,
          'hvac_mode_setting': 'heat_cool',
          'name': 'Unoccupied',
          ...
        }
      ],
      ...
    },
    ...
  )
  ```

  ```json Ruby theme={null}
  <Seam::Resources::Device:0x005f0
    device_id="2d488679-6f07-4810-aed2-e726872c1dd5"
    properties=#<Seam::DeepHashAccessor:0x000001bf948fdbd0 @data={
      "available_climate_presets"=>[
        {
          "climate_preset_key"=>"occupied",
          "name"=>"Occupied",
          "display_name"=>"Occupied",
          "fan_mode_setting"=>"auto",
          "hvac_mode_setting"=>"heat_cool",
          "cooling_set_point_celsius"=>25,
          "heating_set_point_celsius"=>20,
          "cooling_set_point_fahrenheit"=>77,
          "heating_set_point_fahrenheit"=>68,
          ...
        },
        {
          "climate_preset_key"=>"unoccupied",
          "name"=>"Unoccupied",
          "display_name"=>"Unoccupied",
          "fan_mode_setting"=>"auto",
          "hvac_mode_setting"=>"heat_cool",
          "manual_override_allowed"=>true,
          "cooling_set_point_celsius"=>30,
          "heating_set_point_celsius"=>15,
          "cooling_set_point_fahrenheit"=>86,
          "heating_set_point_fahrenheit"=>59,
          ...
        }
      ]
      ...
   }
   ...
  >
  ```

  ```json PHP theme={null}
  {
    "device_id": "2d488679-6f07-4810-aed2-e726872c1dd5",
    "properties": {
      "available_climate_presets": [
          {
            "climate_preset_key": "occupied",
            "cooling_set_point_celsius": 25,
            "cooling_set_point_fahrenheit": 77,
            "display_name": "Occupied",
            "fan_mode_setting": "auto",
            "heating_set_point_celsius": 20,
            "heating_set_point_fahrenheit": 68,
            "hvac_mode_setting": "heat_cool",
            "name": "Occupied",
            ...
          },
          {
            "climate_preset_key": "unoccupied",
            "cooling_set_point_celsius": 30,
            "cooling_set_point_fahrenheit": 86,
            "display_name": "Unoccupied",
            "fan_mode_setting": "auto",
            "heating_set_point_celsius": 15,
            "heating_set_point_fahrenheit": 59,
            "hvac_mode_setting": "heat_cool",
            "name": "Unoccupied",
            ...
          }
      ],
      ...
    },
    ...
  }
  ```

  ```json C# theme={null}
  // Coming soon!
  ```
</CodeGroup>

***

## Update a Climate Preset

To update a climate preset, issue a [`/thermostats/update_climate_preset`](/api/thermostats/update_climate_preset) request, providing the `device_id` of the thermostat and the `climate_preset_key` of the desired climate preset. Also, include the desired updated settings for the climate preset.

**Request:**

<CodeGroup>
  ```javascript JavaScript theme={null}
  await seam.thermostats.updateClimatePreset({
    device_id: '2d488679-6f07-4810-aed2-e726872c1dd5',
    climate_preset_key: 'occupied',
    cooling_set_point_celsius: 24,
  })
  ```

  ```bash cURL theme={null}
  curl -X 'POST' \
    'https://connect.getseam.com/thermostats/update_climate_preset' \
    -H 'accept: application/json' \
    -H "Authorization: Bearer ${SEAM_API_KEY}" \
    -H 'Content-Type: application/json' \
    -d '{
      "device_id": "2d488679-6f07-4810-aed2-e726872c1dd5",
      "climate_preset_key": "occupied",
      "cooling_set_point_celsius": 24
  }'
  ```

  ```python Python theme={null}
  seam.thermostats.update_climate_preset(
    device_id = "2d488679-6f07-4810-aed2-e726872c1dd5",
    climate_preset_key = "occupied",
    cooling_set_point_celsius = 24
  )
  ```

  ```ruby Ruby theme={null}
  seam.thermostats.update_climate_preset(
    device_id: "2d488679-6f07-4810-aed2-e726872c1dd5",
    climate_preset_key: "occupied",
    cooling_set_point_celsius: 24
  )
  ```

  ```php PHP theme={null}
  $seam->thermostats->update_climate_preset(
    device_id: "2d488679-6f07-4810-aed2-e726872c1dd5",
    climate_preset_key: "occupied",
    cooling_set_point_celsius: 24
  );
  ```

  ```csharp C# theme={null}
  // Coming soon!
  ```
</CodeGroup>

**Response:**

<CodeGroup>
  ```json JavaScript theme={null}
  void
  ```

  ```json cURL theme={null}
  {
    "ok": true
  }
  ```

  ```json Python theme={null}
  None
  ```

  ```json Ruby theme={null}
  nil
  ```

  ```json PHP theme={null}
  void
  ```

  ```json C# theme={null}
  // Coming soon!
  ```
</CodeGroup>

***

## Delete a Climate Preset

To delete a climate preset, issue a [`/thermostats/delete_climate_preset`](/api/thermostats/delete_climate_preset) request, providing the `device_id` of the thermostat and the `climate_preset_key` of the desired climate preset.

**Request:**

<CodeGroup>
  ```javascript JavaScript theme={null}
  await seam.thermostats.deleteClimatePreset({
    device_id: '2d488679-6f07-4810-aed2-e726872c1dd5',
    climate_preset_key: 'occupied',
  })
  ```

  ```bash cURL theme={null}
  curl -X 'POST' \
    'https://connect.getseam.com/thermostats/delete_climate_preset' \
    -H 'accept: application/json' \
    -H "Authorization: Bearer ${SEAM_API_KEY}" \
    -H 'Content-Type: application/json' \
    -d '{
      "device_id": "2d488679-6f07-4810-aed2-e726872c1dd5",
      "climate_preset_key": "occupied"
  }'
  ```

  ```python Python theme={null}
  seam.thermostats.delete_climate_preset(
    device_id = "2d488679-6f07-4810-aed2-e726872c1dd5",
    climate_preset_key = "occupied"
  )
  ```

  ```ruby Ruby theme={null}
  seam.thermostats.delete_climate_preset(
    device_id: "2d488679-6f07-4810-aed2-e726872c1dd5",
    climate_preset_key: "occupied"
  )
  ```

  ```php PHP theme={null}
  $seam->thermostats->delete_climate_preset(
    device_id: "2d488679-6f07-4810-aed2-e726872c1dd5",
    climate_preset_key: "occupied"
  );
  ```

  ```java C# theme={null}
  // Coming soon!
  ```
</CodeGroup>

**Response:**

<CodeGroup>
  ```json JavaScript theme={null}
  void
  ```

  ```json cURL theme={null}
  {
    "ok": true
  }
  ```

  ```json Python theme={null}
  None
  ```

  ```json Ruby theme={null}
  nil
  ```

  ```json PHP theme={null}
  void
  ```

  ```json C# theme={null}
  // Coming soon!
  ```
</CodeGroup>
