> ## Documentation Index
> Fetch the complete documentation index at: https://seam-feat-mintlify-migration-iteration.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieving Thermostats

> Learn how to retrieve all thermostats or a specific thermostat by ID.

When you use the [`/thermostats/list`](/api/thermostats/list) and [`/devices/get`](/api/devices/get) endpoints to retrieve information about your connected thermostats, the Seam API returns the following categories of information:

<table>
  <thead>
    <tr>
      <th width="250">Category</th>
      <th>Details</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>Current conditions </td>

      <td>
        Current temperature in Fahrenheit and Celsius, current relative
        humidity, and so on. This includes such properties as{' '}
        <code>temperature\_celsius</code>, <code>temperature\_fahrenheit</code>,{' '}
        <code>is\_cooling</code>, <code>is\_heating</code>,{' '}
        <code>is\_fan\_running</code>, <code>relative\_humidity</code>{' '}
      </td>
    </tr>

    <tr>
      <td>Current operational status</td>

      <td>
        Whether the associated HVAC system is currently heating or cooling,
        whether the fan is currently running. These properties are named{' '}
        <code>current\_climate\_setting</code> and reflect what the thermostat is
        set to 'achieve'.
      </td>
    </tr>

    <tr>
      <td>Available HVAC modes for the thermostat</td>

      <td>
        <code>heat</code>, <code>cool</code>, <code>heat\_cool</code>, and{' '}
        <code>off</code>.
      </td>
    </tr>

    <tr>
      <td>Available fan modes for the thermostat</td>

      <td>
        <code>on</code>, <code>auto</code>, and <code>circulate</code>.
      </td>
    </tr>

    <tr>
      <td>
        Thermostat <a href="/capability-guides/thermostats#thermostat-capabilities">capability flags</a>
      </td>

      <td>
        <p>Capabilities of the thermostat—at a granular level.</p>
        <p>These capability flags include the following:</p>

        <ul>
          <li>
            <code>device.can\_hvac\_heat</code>
          </li>

          <li>
            <code>device.can\_hvac\_cool</code>
          </li>

          <li>
            <code>device.can\_hvac\_heat\_cool</code>
          </li>

          <li>
            <code>device.can\_turn\_off\_hvac</code>
          </li>
        </ul>
      </td>
    </tr>

    <tr>
      <td>Available climate presets</td>
      <td>Climate presets that you can schedule on the thermostat.</td>
    </tr>

    <tr>
      <td>Climate preset constraints</td>

      <td>
        Constraints related to climate presets for the specific thermostat brand
        or model.

        <br />

        For example, a thermostat might have a minimum or maximum cooling or
        heating{' '}

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

        {' '}

        or a{' '}

        <a href="../../capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta">
          minimum delta
        </a>

        {' '}

        between the cooling and heating set points.
      </td>
    </tr>
  </tbody>
</table>

## List All Thermostats

To retrieve all [thermostats](./), issue a [`/thermostats/list`](/api/thermostats/list) request. You can filter by a variety of criteria, including `connected_account_id`, `connect_webview_id`, `manufacturer`, `user_identifier_key`, and so on.

The following example retrieves all Google Nest thermostats:

<Tabs>
  <Tab title="JavaScript">
    **Request:**

    ```javascript theme={null}
    await seam.thermostats.list({
      manufacturer: 'nest',
    })
    ```

    **Response:**

    ```json theme={null}
    [
      {
        device_id: 'a4b775e3-feb2-4c6b-8e78-a73ec2d70b61',
        device_type: 'nest_thermostat',
        properties: {
          online: true,
          is_cooling: false,
          is_heating: false,
          manufacturer: 'nest',
          is_fan_running: false,
          relative_humidity: 0.46,
          temperature_celsius: 24.64,
          temperature_fahrenheit: 76.352,
          available_hvac_mode_settings: [
            'heat',
            'cool',
            'heat_cool',
            'off'
          ],
          current_climate_setting: {
            display_name: 'eco',
            hvac_mode_setting: 'heat_cool',
            manual_override_allowed: true,
            cooling_set_point_celsius: 25,
            cooling_set_point_fahrenheit: 77,
            heating_set_point_celsius: 20,
            heating_set_point_fahrenheit: 68
          },
          ...
        },
        can_hvac_cool: true,
        can_hvac_heat: true,
        can_turn_off_hvac: true,
        can_hvac_heat_cool: true,
        ...
      },
      ...
    ]
    ```
  </Tab>

  <Tab title="cURL">
    **Request:**

    ```bash theme={null}
    # Use GET or POST.
    curl -X 'GET' \
      'https://connect.getseam.com/thermostats/list' \
      -H 'accept: application/json' \
      -H "Authorization: Bearer ${API_KEY}" \
      -H 'Content-Type: application/json' \
      -d '{
      "manufacturer": "nest"
      }'
    ```

    **Response:**

    ```json theme={null}
    {
      "thermostats": [
        {
          "device_id": "a4b775e3-feb2-4c6b-8e78-a73ec2d70b61",
          "device_type": "nest_thermostat",
          "properties": {
            "online": true,
            "is_cooling": false,
            "is_heating": false,
            "is_fan_running": false,
            "manufacturer": "nest",
            "relative_humidity": 0.46,
            "temperature_celsius": 24.64,
            "temperature_fahrenheit": 76.352,
            "current_climate_setting": {
              "display_name": "eco",
              "hvac_mode_setting": "heat_cool",
              "manual_override_allowed": true,
              "cooling_set_point_celsius": 25,
              "cooling_set_point_fahrenheit": 77,
              "heating_set_point_celsius": 20,
              "heating_set_point_fahrenheit": 68
            },
            "available_hvac_mode_settings": [
              "heat",
              "cool",
              "heat_cool",
              "off"
            ],
            ...
          },
          "can_hvac_cool": true,
          "can_hvac_heat": true,
          "can_turn_off_hvac": true,
          "can_hvac_heat_cool": true,
          ...
        },
        ...
      ],
      "ok": true
    }
    ```
  </Tab>

  <Tab title="Python">
    **Request:**

    ```python theme={null}
    seam.thermostats.list(
      manufacturer = "nest"
    )
    ```

    **Response:**

    ```
    [
      Device(
        can_hvac_cool=True,
        can_hvac_heat=True,
        can_hvac_heat_cool=True,
        can_turn_off_hvac=True,
        device_id='a4b775e3-feb2-4c6b-8e78-a73ec2d70b61',
        device_type='nest_thermostat',
        properties={
          'available_hvac_mode_settings': [
            'heat',
            'cool',
            'heat_cool',
            'off'
          ],
          'current_climate_setting': {
            'display_name': 'eco',
            'cooling_set_point_celsius': 25,
            'cooling_set_point_fahrenheit': 77,
            'heating_set_point_celsius': 20,
            'heating_set_point_fahrenheit': 68,
            'hvac_mode_setting': 'heat_cool',
            'manual_override_allowed': True
          },
          'is_cooling': False,
          'is_fan_running': False,
          'is_heating': False,
          'manufacturer': 'nest',
          'online': True,
          'relative_humidity': 0.46,
          'temperature_celsius': 24.64,
          'temperature_fahrenheit': 76.352,
          ...
        },
        ...
      ),
      ...
    ]
    ```
  </Tab>

  <Tab title="Ruby">
    **Request:**

    ```ruby theme={null}
    seam.thermostats.list(
      manufacturer: "nest"
    )
    ```

    **Response:**

    ```
    [
      <Seam::Resources::Device:0x005f0
        device_id="a4b775e3-feb2-4c6b-8e78-a73ec2d70b61"
        device_type="nest_thermostat"
        properties=#<Seam::DeepHashAccessor:0x0000016b1791f068 @data={
          "online"=>true,
          "is_cooling"=>false,
          "is_heating"=>false,
          "manufacturer"=>"nest",
          "is_fan_running"=>false,
          "relative_humidity"=>0.36,
          "temperature_celsius"=>21.11111111111111,
          "temperature_fahrenheit"=>70,
          "available_hvac_mode_settings"=>[
            "heat",
            "cool",
            "heat_cool",
            "off"
          ],
          "current_climate_setting"=>{
            "climate_preset_key"=>"unoccupied",
            "can_edit"=>true,
            "can_delete"=>true,
            "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
          },
          ...
        }>
        can_hvac_cool=true
        can_hvac_heat=true
        can_turn_off_hvac=true
        can_hvac_heat_cool=true
        ...
      >,
      ...
    ]
    ```
  </Tab>

  <Tab title="PHP">
    **Request:**

    ```php theme={null}
    $seam->thermostats->list(
      manufacturer: "nest"
    );
    ```

    **Response:**

    ```json theme={null}
    [
      {
        "can_hvac_cool": true,
        "can_hvac_heat": true,
        "can_hvac_heat_cool": true,
        "can_turn_off_hvac": true,
        "device_id": "a4b775e3-feb2-4c6b-8e78-a73ec2d70b61",
        "device_type": "nest_thermostat",
        "properties": {
          "manufacturer": "nest",
          "online": true,
          "available_hvac_mode_settings": [
            "heat",
            "cool",
            "heat_cool",
            "off"
          ],
          "current_climate_setting": {
            "display_name": "eco",
            "cooling_set_point_celsius": 25,
            "cooling_set_point_fahrenheit": 77,
            "heating_set_point_celsius": 20,
            "heating_set_point_fahrenheit": 68,
            "hvac_mode_setting": "heat_cool",
            "manual_override_allowed": true
          },
          "is_cooling": false,
          "is_fan_running": false,
          "is_heating": false,
          "relative_humidity": 0.46,
          "temperature_celsius": 24.64,
          "temperature_fahrenheit": 76.352,
          ...
        },
        ...
      },
      ...
    ]
    ```
  </Tab>

  <Tab title="C#">
    **Request:**

    ```csharp theme={null}
    // Coming soon!
    ```

    **Response:**

    ```json theme={null}
    // Coming soon!
    ```
  </Tab>
</Tabs>

***

## Get an Individual Thermostat

To get a specific [thermostat](./), issue a [`/devices/get`](/api/devices/get) request, including the desired `device_id`.

<Tabs>
  <Tab title="JavaScript">
    **Request:**

    ```javascript theme={null}
    await seam.devices.get({
      device_id: 'a4b775e3-feb2-4c6b-8e78-a73ec2d70b61',
    })
    ```

    **Response:**

    ```json theme={null}
    {
      device_id: 'a4b775e3-feb2-4c6b-8e78-a73ec2d70b61',
      device_type: 'nest_thermostat',
      properties: {
        online: true,
        is_cooling: false,
        is_heating: false,
        manufacturer: 'nest',
        is_fan_running: false,
        relative_humidity: 0.46,
        temperature_celsius: 24.64,
        temperature_fahrenheit: 76.352,
        current_climate_setting: [Object],
        available_hvac_mode_settings: [
          'heat',
          'cool',
          'heat_cool',
          'off'
        ],
        current_climate_setting: {
          display_name: 'eco',
          hvac_mode_setting: 'heat_cool',
          manual_override_allowed: true,
          cooling_set_point_celsius: 25,
          cooling_set_point_fahrenheit: 77,
          heating_set_point_celsius: 20,
          heating_set_point_fahrenheit: 68
        },
        ...
      },
      can_hvac_cool: true,
      can_hvac_heat: true,
      can_turn_off_hvac: true,
      can_hvac_heat_cool: true,
      ...
    }
    ```
  </Tab>

  <Tab title="cURL">
    **Request:**

    ```bash theme={null}
    # Use GET or POST.
    curl -X 'GET' \
      'https://connect.getseam.com/devices/get' \
      -H 'accept: application/json' \
      -H 'Authorization: Bearer ${API_KEY}' \
      -H 'Content-Type: application/json' \
      -d '{
      "device_id": "a4b775e3-feb2-4c6b-8e78-a73ec2d70b61"
    }'
    ```

    **Response:**

    ```json theme={null}
    {
      "device": {
        "device_id": "a4b775e3-feb2-4c6b-8e78-a73ec2d70b61",
        "device_type": "nest_thermostat",
        "properties": {
          "online": true,
          "is_cooling": false,
          "is_heating": false,
          "is_fan_running": false,
          "manufacturer": "nest",
          "relative_humidity": 0.46,
          "temperature_celsius": 24.64,
          "temperature_fahrenheit": 76.352,
          "current_climate_setting": {
            "display_name": "eco",
            "hvac_mode_setting": "heat_cool",
            "manual_override_allowed": true,
            "cooling_set_point_celsius": 25,
            "cooling_set_point_fahrenheit": 77,
            "heating_set_point_celsius": 20,
            "heating_set_point_fahrenheit": 68
          },
          "available_hvac_mode_settings": [
            "heat",
            "cool",
            "heat_cool",
            "off"
          ],
          ...
        },
        "can_hvac_cool": true,
        "can_hvac_heat": true,
        "can_turn_off_hvac": true,
        "can_hvac_heat_cool": true,
        ...
      },
      "ok": true
    }
    ```
  </Tab>

  <Tab title="Python">
    **Request:**

    ```python theme={null}
    seam.devices.get(
      device_id = "a4b775e3-feb2-4c6b-8e78-a73ec2d70b61"
    )
    ```

    **Response:**

    ```
    Device(
      can_hvac_cool=True,
      can_hvac_heat=True,
      can_hvac_heat_cool=True,
      can_turn_off_hvac=True,
      device_id='a4b775e3-feb2-4c6b-8e78-a73ec2d70b61',
      device_type='nest_thermostat',
      properties={
        'available_hvac_mode_settings': [
          'heat',
          'cool',
          'heat_cool',
          'off'
        ],
        'current_climate_setting': {
          'display_name': 'eco',
          'cooling_set_point_celsius': 25,
          'cooling_set_point_fahrenheit': 77,
          'heating_set_point_celsius': 20,
          'heating_set_point_fahrenheit': 68,
          'hvac_mode_setting': 'heat_cool',
          'manual_override_allowed': True
        },
        'is_cooling': False,
        'is_fan_running': False,
        'is_heating': False,
        'manufacturer': 'nest',
        'online': True,
        'relative_humidity': 0.46,
        'temperature_celsius': 24.64,
        'temperature_fahrenheit': 76.352,
        ...
      },
      ...
    )
    ```
  </Tab>

  <Tab title="Ruby">
    **Request:**

    ```ruby theme={null}
    # Coming soon!
    ```

    **Response:**

    ```
    # Coming soon!
    ```
  </Tab>

  <Tab title="PHP">
    **Request:**

    ```php theme={null}
    $seam->devices->get(
      device_id: "a4b775e3-feb2-4c6b-8e78-a73ec2d70b61"
    );
    ```

    **Response:**

    ```json theme={null}
    {
      "can_hvac_cool": true,
      "can_hvac_heat": true,
      "can_hvac_heat_cool": true,
      "can_turn_off_hvac": true,
      "device_id": "a4b775e3-feb2-4c6b-8e78-a73ec2d70b61",
      "device_type": "nest_thermostat",
      "properties": {
        "manufacturer": "nest",
        "online": true,
        "available_hvac_mode_settings": [
          "heat",
          "cool",
          "heat_cool",
          "off"
        ],
        "current_climate_setting": {
          "display_name": "eco",
          "cooling_set_point_celsius": 25,
          "cooling_set_point_fahrenheit": 77,
          "heating_set_point_celsius": 20,
          "heating_set_point_fahrenheit": 68,
          "hvac_mode_setting": "heat_cool",
          "manual_override_allowed": true
        },
        "is_cooling": false,
        "is_fan_running": false,
        "is_heating": false,
        "relative_humidity": 0.46,
        "temperature_celsius": 24.64,
        "temperature_fahrenheit": 76.352,
        ...
      },
      ...
    }
    ```
  </Tab>

  <Tab title="C#">
    **Request:**

    ```csharp theme={null}
    // Coming soon!
    ```

    **Response:**

    ```
    // Coming soon!
    ```
  </Tab>
</Tabs>
