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

# Get Started with Cielo Thermostats

> Connect Cielo devices to Seam, check each device's supported HVAC modes, set the temperature, and schedule climate presets.

Use Seam to connect a Cielo account, list its devices as thermostats, set a device's HVAC mode and set point, and schedule climate presets. Each Cielo device reports its own capabilities, and only Cielo Smart Thermostats support `heat_cool`. Check the [Cielo-specific restrictions](https://www.seam.co/docs/device-and-system-integration-guides/cielo-thermostats/index.md#brand-specific-restrictions) before you build.

> [!NOTE]
>
> The Cielo integration is in beta. To enable it for your workspaces, contact [Seam support](mailto:support@seam.co).

For real devices, complete the [Cielo setup guide](https://www.seam.co/docs/device-and-system-integration-guides/cielo-thermostats/cielo-setup-guide.md) first. [Create a Seam account and get an API key](https://console.seam.co/) to try [virtual Cielo thermostats](https://www.seam.co/docs/device-and-system-integration-guides/cielo-thermostats/sandbox-cielo-thermostats.md) in a sandbox workspace.

## Step 1: Install a Seam SDK

Seam provides client libraries for many languages, including JavaScript, Python, Ruby, PHP, and others, as well as a Postman collection and an [OpenAPI](https://connect.getseam.com/openapi.json) spec.

* JavaScript / TypeScript ([npm](https://www.npmjs.com/package/seam), [GitHub](https://github.com/seamapi/javascript))
* Python ([pip](https://pypi.org/project/seam/), [GitHub](https://github.com/seamapi/python))
* Ruby Gem ([rubygem](https://rubygems.org/gems/seam), [GitHub](https://github.com/seamapi/ruby))
* PHP ([packagist](https://packagist.org/packages/seamapi/seam), [GitHub](https://github.com/seamapi/php))
* C# ([nuget](https://www.nuget.org/packages/Seam), [GitHub](https://github.com/seamapi/csharp))

First, install a Seam SDK, as follows:

> [tab] JavaScript
>
> ```bash theme={"dark"}
> npm i seam
> ```

> [tab] Python
>
> ```bash theme={"dark"}
> pip install seam
> # For some development environments, use pip3 in this command instead of pip.
> ```

> [tab] Ruby
>
> ```bash theme={"dark"}
> bundle add seam
> ```

> [tab] PHP
>
> ```bash theme={"dark"}
> composer require seamapi/seam
> ```

> [tab] C#
>
> Install using [nuget](https://www.nuget.org/packages/Seam).

Next, go to [https://console.seam.co/](https://console.seam.co/) and [sign up for Seam](https://www.seam.co/docs/core-concepts/seam-console.md#create-a-seam-account) to get your [API key](https://www.seam.co/docs/core-concepts/authentication/api-keys.md).

Then, export your API key as an environment variable.

```bash theme={"dark"}
$ export SEAM_API_KEY=seam_test2bMS_94SrGUXuNR2JmJkjtvBQDg5c
```

> [!NOTE]
>
> This guide uses a [sandbox
> workspace](https://www.seam.co/docs/core-concepts/workspaces.md#sandbox-workspaces). You can only connect
> virtual devices and systems in this type of workspace. If you want to connect
> a real Cielo device, use a [non-sandbox
> workspace](https://www.seam.co/docs/core-concepts/workspaces.md#production-workspaces) and API key.

***

## Step 2: Link your Cielo account with Seam

To control your Cielo devices using the Seam API, you must first authorize your Seam workspace to connect to your Cielo account. If your application needs to connect to your users' Cielo accounts, Seam provides fully-embedded, [customizable](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews.md) client-side [Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews.md) to collect their authorization securely.

Cielo connects through an API key instead of a password. Your user creates the key at [home.cielowigle.com](https://home.cielowigle.com) and pastes it into the Connect Webview. For the steps your users follow, see the [Cielo setup guide](https://www.seam.co/docs/device-and-system-integration-guides/cielo-thermostats/cielo-setup-guide.md).

> [!TIP]
>
> This guide shows you how to create a Connect Webview programmatically using the Seam API.
>
> The [Seam Console](https://www.seam.co/docs/core-concepts/seam-console.md) provides another easy way to connect devices to your Seam workspace.
>
> Go to [https://console.seam.co/](https://console.seam.co/). On the **Devices** page, click **+ Add Devices**. Then, see [Authorize your workspace](#authorize-your-workspace) in this guide to complete the Connect Webview authorization flow.

### Create a Connect Webview

Create a `connect_webview` object and then note the returned URL.

The C# examples in this guide send requests to the Seam API directly.

**Code:**

```javascript JavaScript theme={"dark"}
import { Seam } from 'seam'

const seam = new Seam() // Seam automatically uses your exported SEAM_API_KEY.

const connectWebview = await seam.connectWebviews.create({
  accepted_providers: ['cielo'],
})

console.log(connectWebview.login_successful) // false

// Use the returned Connect Webview URL to display
// the Connect Webview authorization flow to your user.
console.log(connectWebview.url)
```

```bash cURL theme={"dark"}
curl -X 'POST' \
  'https://connect.getseam.com/connect_webviews/create' \
  -H 'accept: application/json' \
  -H "Authorization: Bearer ${SEAM_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d '{
  "accepted_providers": ["cielo"]
}' | jq -r '"Login Successful (false): " + (.connect_webview.login_successful | tostring),
  "URL: " + .connect_webview.url'
  # Use the returned Connect Webview URL to display
  # the Connect Webview authorization flow to your user.
```

```python Python theme={"dark"}
from seam import Seam

seam = Seam()  # Seam automatically uses your exported SEAM_API_KEY.

connect_webview = seam.connect_webviews.create(accepted_providers=["cielo"])

assert connect_webview.login_successful is False

# Use the returned Connect Webview URL to display
# the Connect Webview authorization flow to your user.
print(connect_webview.url)
```

```ruby Ruby theme={"dark"}
require "seam"

seam = Seam.new() # Seam automatically uses your exported SEAM_API_KEY.

connect_webview = seam.connect_webviews.create(accepted_providers: ["cielo"])

puts connect_webview.login_successful # false

# Use the returned Connect Webview URL to display
# the Connect Webview authorization flow to your user.
puts connect_webview.url
```

```php PHP theme={"dark"}
<?php
require 'vendor/autoload.php';

$seam = new Seam\SeamClient(); // Seam automatically uses your exported SEAM_API_KEY.

$connect_webview = $seam->connect_webviews->create(
    accepted_providers: ["cielo"]
);

echo $connect_webview->login_successful ? 'true' : 'false', "\n"; // false

// Use the returned Connect Webview URL to display
// the Connect Webview authorization flow to your user.
echo $connect_webview->url;
```

```csharp C# theme={"dark"}
using System;
using Seam.Client;
using Newtonsoft.Json.Linq;

var seam = new SeamClient(Environment.GetEnvironmentVariable("SEAM_API_KEY"));

var connectWebviewResponse = await seam.PostAsync<JObject>(
    "/connect_webviews/create",
    new RequestOptions {
        Data = new { accepted_providers = new[] { "cielo" } }
    }
);
var connectWebview = connectWebviewResponse.EnsureData("/connect_webviews/create")["connect_webview"]!;

Console.WriteLine((bool)connectWebview["login_successful"]!); // False

// Use the returned Connect Webview URL to display
// the Connect Webview authorization flow to your user.
Console.WriteLine((string)connectWebview["url"]!);
```

```bash Seam CLI theme={"dark"}
seam connect-webviews create --accepted_providers ["cielo"]
```

**Output:**

```json theme={"dark"}
{
  "connect_webview_id": "12345678-1234-1234-1234-123456789012",
  "login_successful": false,
  "url": "https://connect.getseam.com/connect_webviews/view?connect_webview_id=12345678-1234-1234-1234-123456789012&auth_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  ...
}
```

***

### Authorize Your Workspace

In a web browser, go to the URL that the Connect Webview object returned.

For application developers, you can redirect your user to this Connect Webview URL so that they can authorize your app to control their devices using Seam. We even provide a prebuilt [Connect Account Button](https://www.seam.co/docs/ui-components/overview/react-components/connect-account-button.md) within our suite of [Seam Components](https://www.seam.co/docs/ui-components/overview.md) that help you build your device management flow.

> [!TIP]
>
> Because you're using a sandbox workspace, you connect Seam's test Cielo
> account. We provide [virtual devices](https://www.seam.co/docs/device-and-system-integration-guides/cielo-thermostats/sandbox-cielo-thermostats.md) for each of
> the brands that we support. These sandbox devices and systems enable you to
> test your app with devices from multiple brands without the need to own all
> the corresponding physical devices.

Complete the Connect Webview authorization flow, as follows:

1. In the Connect Webview, paste the [Cielo sandbox API key](https://www.seam.co/docs/device-and-system-integration-guides/cielo-thermostats/sandbox-cielo-thermostats.md), `1234`.
2. Click **Submit**.

Confirm that authorization through the Connect Webview was successful by querying its status.

**Code:**

```javascript JavaScript theme={"dark"}
const updatedConnectWebview = await seam.connectWebviews.get({
  connect_webview_id: connectWebview.connect_webview_id,
})

console.log(updatedConnectWebview.login_successful) // true
```

```bash cURL theme={"dark"}
curl -X 'POST' \
  'https://connect.getseam.com/connect_webviews/get' \
  -H 'accept: application/json' \
  -H "Authorization: Bearer ${SEAM_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d "{
  \"connect_webview_id\": \"${connect_webview_id}\"
}" | jq -r '"Login Successful (true): " + (.connect_webview.login_successful | tostring)'
```

```python Python theme={"dark"}
updated_connect_webview = seam.connect_webviews.get(
    connect_webview_id=connect_webview.connect_webview_id
)

assert updated_connect_webview.login_successful is True
```

```ruby Ruby theme={"dark"}
updated_connect_webview = seam.connect_webviews.get(
  connect_webview_id: connect_webview.connect_webview_id
)

puts updated_connect_webview.login_successful # true
```

```php PHP theme={"dark"}
$updated_connect_webview = $seam->connect_webviews->get(
    connect_webview_id: $connect_webview->connect_webview_id
);

echo $updated_connect_webview->login_successful ? 'true' : 'false', "\n"; // true
```

```csharp C# theme={"dark"}
var updatedConnectWebviewResponse = await seam.PostAsync<JObject>(
    "/connect_webviews/get",
    new RequestOptions {
        Data = new { connect_webview_id = (string)connectWebview["connect_webview_id"]! }
    }
);
var updatedConnectWebview = updatedConnectWebviewResponse.EnsureData("/connect_webviews/get")["connect_webview"]!;

Console.WriteLine((bool)updatedConnectWebview["login_successful"]!); // True
```

```bash Seam CLI theme={"dark"}
seam connect-webviews get --connect_webview_id "12345678-1234-1234-1234-123456789012"
```

**Output:**

```json theme={"dark"}
{
  "connect_webview_id": "12345678-1234-1234-1234-123456789012",
  "login_successful": true,
  ...
}
```

***

## Step 3: Retrieve Cielo thermostat devices

When you link a Cielo account with Seam, we create a `device` object for each Cielo device in the account that heats or cools. Devices that control a fan-only unit don't appear. You can retrieve these devices using the [List Devices](https://www.seam.co/docs/api/devices/list.md) and [Get Device](https://www.seam.co/docs/api/devices/get.md) endpoints.

The device's `device_type` is `cielo_thermostat`, and `properties.cielo_metadata` identifies the Cielo device by its name and MAC address. The device also reports the room's temperature and humidity, its current climate setting, its supported HVAC modes, and its set point range.

**Code:**

```javascript JavaScript theme={"dark"}
// Retrieve all devices, filtered by manufacturer,
// which is one of several filters that list() supports.
const allCieloThermostats = await seam.devices.list({ manufacturer: 'cielo' })

// Select the Living Room Mini Split as an example.
const livingRoom = allCieloThermostats.find(
  (device) => device.properties.cielo_metadata?.device_name === 'Living Room Mini Split',
)

// Inspect specific properties.
console.log('Current temperature: ' + livingRoom.properties.temperature_celsius)
console.log(
  'HVAC modes: ' + livingRoom.properties.available_hvac_mode_settings,
)

// View the entire returned device object.
console.log(livingRoom)
```

```bash cURL theme={"dark"}
# Retrieve all devices, filtered by manufacturer, which is
# one of several filters that the list endpoint supports.
all_cielo_thermostats=$(
  curl -X 'POST' \
    'https://connect.getseam.com/devices/list' \
    -H 'accept: application/json' \
    -H "Authorization: Bearer ${SEAM_API_KEY}" \
    -H 'Content-Type: application/json' \
    -d '{
    "manufacturer": "cielo"
  }')

# Select the Living Room Mini Split as an example.
living_room=$(jq -r '.devices[] | select(.properties.cielo_metadata.device_name == "Living Room Mini Split")' <<< ${all_cielo_thermostats})

# Inspect specific properties.
echo $(jq -r '"Current temperature: " + (.properties.temperature_celsius | tostring)' <<< ${living_room})
echo $(jq -r '"HVAC modes: " + (.properties.available_hvac_mode_settings | join(","))' <<< ${living_room})

# View the entire returned device object.
echo ${living_room}
```

```python Python theme={"dark"}
from pprint import pprint

# Retrieve all devices, filtered by manufacturer,
# which is one of several filters that list() supports.
all_cielo_thermostats = seam.devices.list(manufacturer="cielo")

# Select the Living Room Mini Split as an example.
living_room = next(
    device
    for device in all_cielo_thermostats
    if device.properties["cielo_metadata"]["device_name"] == "Living Room Mini Split"
)

# Inspect specific properties.
pprint("Current temperature: " + str(living_room.properties["temperature_celsius"]))
pprint("HVAC modes: " + str(living_room.properties["available_hvac_mode_settings"]))

# View the entire returned device object.
pprint(living_room)
```

```ruby Ruby theme={"dark"}
# Retrieve all devices, filtered by manufacturer,
# which is one of several filters that list() supports.
all_cielo_thermostats = seam.devices.list(manufacturer: "cielo")

# Select the Living Room Mini Split as an example.
living_room = all_cielo_thermostats.find do |device|
  device.properties.cielo_metadata.device_name == "Living Room Mini Split"
end

# Inspect specific properties.
puts "Current temperature: " + living_room.properties.temperature_celsius.to_s
puts "HVAC modes: " + living_room.properties.available_hvac_mode_settings.join(",")

# View the entire returned device object.
puts living_room.inspect
```

```php PHP theme={"dark"}
// Retrieve all devices, filtered by manufacturer,
// which is one of several filters that list() supports.
$all_cielo_thermostats = $seam->devices->list(manufacturer: "cielo");

// Select the Living Room Mini Split as an example.
$living_room = null;
foreach ($all_cielo_thermostats as $device) {
    if ($device->properties->cielo_metadata->device_name === "Living Room Mini Split") {
        $living_room = $device;
        break;
    }
}

// Inspect specific properties.
echo "Current temperature: ", $living_room->properties->temperature_celsius, "\n";
echo "HVAC modes: ", implode(",", $living_room->properties->available_hvac_mode_settings), "\n";

// View the entire returned device object.
echo json_encode($living_room, JSON_PRETTY_PRINT);
```

```csharp C# theme={"dark"}
using System.Linq;

var devicesResponse = await seam.PostAsync<JObject>(
    "/devices/list",
    new RequestOptions { Data = new { manufacturer = "cielo" } }
);
var allCieloThermostats = (JArray)devicesResponse.EnsureData("/devices/list")["devices"]!;

// Select the Living Room Mini Split as an example.
var livingRoom = allCieloThermostats.First(
    device => (string?)device["properties"]?["cielo_metadata"]?["device_name"] == "Living Room Mini Split"
);

// Inspect specific properties.
Console.WriteLine("Current temperature: " + livingRoom["properties"]!["temperature_celsius"]);
Console.WriteLine("HVAC modes: " + string.Join(",", livingRoom["properties"]!["available_hvac_mode_settings"]!));

// View the entire returned device object.
Console.WriteLine(livingRoom);
```

```bash Seam CLI theme={"dark"}
seam devices list --manufacturer "cielo"
```

**Output:**

```json theme={"dark"}
Current temperature: 26.4
HVAC modes: heat,cool,off
{
  "device_id": "11111111-1111-1111-2222-444444444444",
  "device_type": "cielo_thermostat",
  "display_name": "Living Room Mini Split",
  "workspace_id": "00000000-0000-0000-0000-000000000000",
  "connected_account_id": "11111111-1111-1111-1111-222222222222",
  "properties": {
    "manufacturer": "cielo",
    "online": true,
    "name": "Living Room Mini Split",
    "temperature_celsius": 26.4,
    "relative_humidity": 0.55,
    "available_hvac_mode_settings": ["heat", "cool", "off"],
    "available_fan_mode_settings": [],
    "min_heating_set_point_celsius": 16,
    "max_heating_set_point_celsius": 30,
    "min_cooling_set_point_celsius": 16,
    "max_cooling_set_point_celsius": 30,
    "current_climate_setting": {
      "hvac_mode_setting": "cool",
      "cooling_set_point_celsius": 24,
      ...
    },
    "cielo_metadata": {
      "device_name": "Living Room Mini Split",
      "mac_address": "C4:5B:BE:00:00:01",
      "appliance_id": 1001,
      "cielo_device_type": "BREEZ-MAX",
      "temperature_unit": "C"
    },
    ...
  },
  "can_hvac_heat": true,
  "can_hvac_cool": true,
  "can_hvac_heat_cool": false,
  "can_turn_off_hvac": true,
  ...
}
```

***

## Step 4: Control your Cielo thermostat

Each device that you connect to Seam has a specific set of capabilities. [Capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities.md#capability-flags) tell your application what each device supports. For Cielo, check `can_hvac_heat`, `can_hvac_cool`, and `can_hvac_heat_cool` before you send a command. Most Breez devices support `heat`, `cool`, and `off`, and a Cielo Smart Thermostat also supports `heat_cool`.

Try out the following actions on your Cielo device:

* [Set the HVAC mode](#set-the-hvac-mode)
* [Verify the change](#verify-the-change)
* [Create and schedule climate presets](#create-and-schedule-climate-presets)

### Set the HVAC mode

To set the HVAC mode, use any of the following endpoints or their equivalents in the Seam SDKs:

* `/thermostats/heat`
* `/thermostats/cool`
* `/thermostats/off`
* `/thermostats/set_hvac_mode`

Specify the thermostat that you want to control by including the `device_id` in the request body. Also, include the desired temperature [set point](https://www.seam.co/docs/capability-guides/thermostats/understanding-thermostat-concepts/set-points.md). The set point must be within the device's range, such as `min_heating_set_point_celsius` and `max_heating_set_point_celsius`.

In this example, set the Living Room Mini Split to `heat` with a heating set point of 21 °C. Each of these HVAC mode endpoints returns an [action attempt](https://www.seam.co/docs/core-concepts/action-attempts.md) to track the progress of the operation.

**Code:**

```javascript JavaScript theme={"dark"}
// Confirm that the device supports heat mode.
// You're using a capability flag here!
if (livingRoom.can_hvac_heat) {
  // Perform the heat operation and wait for the action attempt.
  const actionAttempt = await seam.thermostats.heat({
    device_id: livingRoom.device_id,
    heating_set_point_celsius: 21,
  })

  console.log(actionAttempt)
}
```

```bash cURL theme={"dark"}
# Confirm that the device supports heat mode.
# You're using a capability flag here!
if  $(jq -r '.can_hvac_heat' <<< ${living_room}); then \
  # Perform the heat operation and return an action attempt.
  curl -X 'POST' \
    'https://connect.getseam.com/thermostats/heat' \
    -H 'accept: application/json' \
    -H "Authorization: Bearer ${SEAM_API_KEY}" \
    -H 'Content-Type: application/json' \
    -d "{
      \"device_id\": \"$(jq -r '.device_id' <<< ${living_room})\",
      \"heating_set_point_celsius\": 21
  }";
fi
```

```python Python theme={"dark"}
# Confirm that the device supports heat mode.
# You're using a capability flag here!
if living_room.can_hvac_heat:
    # Perform the heat operation and wait for the action attempt.
    action_attempt = seam.thermostats.heat(
        device_id=living_room.device_id, heating_set_point_celsius=21
    )

    pprint(action_attempt)
```

```ruby Ruby theme={"dark"}
# Confirm that the device supports heat mode.
# You're using a capability flag here!
if living_room.can_hvac_heat
  # Perform the heat operation and wait for the action attempt.
  action_attempt = seam.thermostats.heat(
    device_id: living_room.device_id,
    heating_set_point_celsius: 21,
  )

  puts action_attempt.inspect
end
```

```php PHP theme={"dark"}
// Confirm that the device supports heat mode.
// You're using a capability flag here!
if ($living_room->can_hvac_heat) {
    // Perform the heat operation and wait for the action attempt.
    $action_attempt = $seam->thermostats->heat(
        device_id: $living_room->device_id,
        heating_set_point_celsius: 21,
    );

    echo json_encode($action_attempt, JSON_PRETTY_PRINT);
}
```

```csharp C# theme={"dark"}
// Confirm that the device supports heat mode.
// You're using a capability flag here!
if ((bool?)livingRoom["can_hvac_heat"] == true) {
    // Perform the heat operation and return an action attempt.
    var actionAttempt = await seam.Thermostats.HeatAsync(
        deviceId: (string)livingRoom["device_id"]!,
        heatingSetPointCelsius: 21
    );

    Console.WriteLine(actionAttempt);
}
```

```bash Seam CLI theme={"dark"}
seam thermostats heat --device_id "11111111-1111-1111-2222-444444444444" --heating_set_point_celsius 21
```

**Output:**

```json theme={"dark"}
{
  "action_attempt_id": "11111111-2222-3333-4444-555555555555",
  "action_type": "SET_HVAC_MODE",
  "status": "success",
  "result": {},
  "error": null
}
```

> [!NOTE]
>
> Native SDK action methods and Seam CLI commands wait for the action attempt automatically. Raw HTTP
> calls do not. If you use raw HTTP, poll until the action attempt is no longer
> pending. See
> [Action Attempts](https://www.seam.co/docs/core-concepts/action-attempts.md).

### Verify the change

Confirm that the action attempt succeeded, then get the device and read `properties.current_climate_setting`. Its `hvac_mode_setting` and `heating_set_point_celsius` show what Cielo reports for the device. `properties.temperature_celsius` is the room's measured temperature, not the set point.

**Code:**

```javascript JavaScript theme={"dark"}
// Get the device by ID.
const updatedLivingRoom = await seam.devices.get({
  device_id: livingRoom.device_id,
})

// Inspect properties.current_climate_setting
// to confirm that the device is heating to 21 °C.
console.log(updatedLivingRoom.properties.current_climate_setting)
```

```bash cURL theme={"dark"}
# Get the device by ID.
updated_living_room=$(
  curl -X 'POST' \
    'https://connect.getseam.com/devices/get' \
    -H 'accept: application/json' \
    -H "Authorization: Bearer ${SEAM_API_KEY}" \
    -H 'Content-Type: application/json' \
    -d "{
    \"device_id\": \"$(jq -r '.device_id' <<< ${living_room})\"
  }")

# Inspect properties.current_climate_setting
# to confirm that the device is heating to 21 °C.
echo $(jq -r '.device.properties.current_climate_setting' <<< ${updated_living_room})
```

```python Python theme={"dark"}
# Get the device by ID.
updated_living_room = seam.devices.get(device_id=living_room.device_id)

# Inspect properties.current_climate_setting
# to confirm that the device is heating to 21 °C.
pprint(updated_living_room.properties["current_climate_setting"])
```

```ruby Ruby theme={"dark"}
# Get the device by ID.
updated_living_room = seam.devices.get(device_id: living_room.device_id)

# Inspect properties.current_climate_setting
# to confirm that the device is heating to 21 °C.
puts updated_living_room.properties.current_climate_setting.inspect
```

```php PHP theme={"dark"}
// Get the device by ID.
$updated_living_room = $seam->devices->get(device_id: $living_room->device_id);

// Inspect properties.current_climate_setting
// to confirm that the device is heating to 21 °C.
echo json_encode($updated_living_room->properties->current_climate_setting, JSON_PRETTY_PRINT);
```

```csharp C# theme={"dark"}
// Get the device by ID.
var updatedLivingRoomResponse = await seam.PostAsync<JObject>(
    "/devices/get",
    new RequestOptions { Data = new { device_id = (string)livingRoom["device_id"]! } }
);
var updatedLivingRoom = updatedLivingRoomResponse.EnsureData("/devices/get")["device"]!;

// Inspect properties.current_climate_setting
// to confirm that the device is heating to 21 °C.
Console.WriteLine(updatedLivingRoom["properties"]!["current_climate_setting"]);
```

```bash Seam CLI theme={"dark"}
seam devices get --device_id "11111111-1111-1111-2222-444444444444"
```

**Output:**

```json theme={"dark"}
{
  "hvac_mode_setting": "heat",
  "heating_set_point_celsius": 21,
  ...
}
```

If the reported settings don't match yet, Seam may not have read the device since the change. Seam reads each Cielo account every 5 minutes. Get the device again after a short wait, or listen for thermostat [events](https://www.seam.co/docs/api/thermostats/events.md) instead of retrying the command. For a Breez device, the reported setting is the last one sent to the air conditioner. For details, see [Settings on Breez Devices Are Sent, Not Confirmed](https://www.seam.co/docs/device-and-system-integration-guides/cielo-thermostats/index.md#settings-on-breez-devices-are-sent-not-confirmed).

If you test a real device, record its original mode and set point and restore them after the test. Changing the set point also leaves any active Cielo preset.

### Create and schedule climate presets

You can use the Seam API to create climate presets for Cielo devices. Each climate preset is a saved group of settings, such as the HVAC mode and set point. For example, you could create a comfort preset for when a vacation rental is occupied and an eco preset for when it's empty.

You can schedule climate presets to start and stop whenever you'd like, and set a fallback climate preset that applies outside your schedules. Because Seam doesn't support fan modes for Cielo, leave out `fan_mode_setting` when you create a Cielo climate preset.

In this example, create comfort and eco presets for the Living Room Mini Split, set eco as the fallback, and schedule the comfort preset for a guest's stay.

**Code:**

```javascript JavaScript theme={"dark"}
// Create the climate presets.
await seam.thermostats.createClimatePreset({
  device_id: livingRoom.device_id,
  climate_preset_key: 'comfort',
  name: 'Comfort',
  hvac_mode_setting: 'heat',
  heating_set_point_celsius: 21,
})

await seam.thermostats.createClimatePreset({
  device_id: livingRoom.device_id,
  climate_preset_key: 'eco',
  name: 'Eco',
  hvac_mode_setting: 'heat',
  heating_set_point_celsius: 16,
})

// Set eco as the fallback climate preset.
await seam.thermostats.setFallbackClimatePreset({
  device_id: livingRoom.device_id,
  climate_preset_key: 'eco',
})

// Schedule the comfort preset for a guest's stay.
await seam.thermostats.schedules.create({
  device_id: livingRoom.device_id,
  name: "Jane's stay",
  climate_preset_key: 'comfort',
  starts_at: '2026-12-18T15:00:00Z',
  ends_at: '2026-12-22T11:00:00Z',
  is_override_allowed: true,
  max_override_period_minutes: 90,
})
```

```bash cURL theme={"dark"}
device_id=$(jq -r '.device_id' <<< ${living_room})

# Create the climate presets.
curl -X 'POST' \
  'https://connect.getseam.com/thermostats/create_climate_preset' \
  -H "Authorization: Bearer ${SEAM_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d "{
  \"device_id\": \"${device_id}\",
  \"climate_preset_key\": \"comfort\",
  \"name\": \"Comfort\",
  \"hvac_mode_setting\": \"heat\",
  \"heating_set_point_celsius\": 21
}"

curl -X 'POST' \
  'https://connect.getseam.com/thermostats/create_climate_preset' \
  -H "Authorization: Bearer ${SEAM_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d "{
  \"device_id\": \"${device_id}\",
  \"climate_preset_key\": \"eco\",
  \"name\": \"Eco\",
  \"hvac_mode_setting\": \"heat\",
  \"heating_set_point_celsius\": 16
}"

# Set eco as the fallback climate preset.
curl -X 'POST' \
  'https://connect.getseam.com/thermostats/set_fallback_climate_preset' \
  -H "Authorization: Bearer ${SEAM_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d "{
  \"device_id\": \"${device_id}\",
  \"climate_preset_key\": \"eco\"
}"

# Schedule the comfort preset for a guest's stay.
curl -X 'POST' \
  'https://connect.getseam.com/thermostats/schedules/create' \
  -H "Authorization: Bearer ${SEAM_API_KEY}" \
  -H 'Content-Type: application/json' \
  -d "{
  \"device_id\": \"${device_id}\",
  \"name\": \"Jane's stay\",
  \"climate_preset_key\": \"comfort\",
  \"starts_at\": \"2026-12-18T15:00:00Z\",
  \"ends_at\": \"2026-12-22T11:00:00Z\",
  \"is_override_allowed\": true,
  \"max_override_period_minutes\": 90
}"
```

```python Python theme={"dark"}
# Create the climate presets.
seam.thermostats.create_climate_preset(
    device_id=living_room.device_id,
    climate_preset_key="comfort",
    name="Comfort",
    hvac_mode_setting="heat",
    heating_set_point_celsius=21,
)

seam.thermostats.create_climate_preset(
    device_id=living_room.device_id,
    climate_preset_key="eco",
    name="Eco",
    hvac_mode_setting="heat",
    heating_set_point_celsius=16,
)

# Set eco as the fallback climate preset.
seam.thermostats.set_fallback_climate_preset(
    device_id=living_room.device_id, climate_preset_key="eco"
)

# Schedule the comfort preset for a guest's stay.
seam.thermostats.schedules.create(
    device_id=living_room.device_id,
    name="Jane's stay",
    climate_preset_key="comfort",
    starts_at="2026-12-18T15:00:00Z",
    ends_at="2026-12-22T11:00:00Z",
    is_override_allowed=True,
    max_override_period_minutes=90,
)
```

```ruby Ruby theme={"dark"}
# Create the climate presets.
seam.thermostats.create_climate_preset(
  device_id: living_room.device_id,
  climate_preset_key: "comfort",
  name: "Comfort",
  hvac_mode_setting: "heat",
  heating_set_point_celsius: 21,
)

seam.thermostats.create_climate_preset(
  device_id: living_room.device_id,
  climate_preset_key: "eco",
  name: "Eco",
  hvac_mode_setting: "heat",
  heating_set_point_celsius: 16,
)

# Set eco as the fallback climate preset.
seam.thermostats.set_fallback_climate_preset(
  device_id: living_room.device_id,
  climate_preset_key: "eco",
)

# Schedule the comfort preset for a guest's stay.
seam.thermostats.schedules.create(
  device_id: living_room.device_id,
  name: "Jane's stay",
  climate_preset_key: "comfort",
  starts_at: "2026-12-18T15:00:00Z",
  ends_at: "2026-12-22T11:00:00Z",
  is_override_allowed: true,
  max_override_period_minutes: 90,
)
```

```php PHP theme={"dark"}
// Create the climate presets.
$seam->thermostats->create_climate_preset(
    device_id: $living_room->device_id,
    climate_preset_key: "comfort",
    name: "Comfort",
    hvac_mode_setting: "heat",
    heating_set_point_celsius: 21,
);

$seam->thermostats->create_climate_preset(
    device_id: $living_room->device_id,
    climate_preset_key: "eco",
    name: "Eco",
    hvac_mode_setting: "heat",
    heating_set_point_celsius: 16,
);

// Set eco as the fallback climate preset.
$seam->thermostats->set_fallback_climate_preset(
    device_id: $living_room->device_id,
    climate_preset_key: "eco",
);

// Schedule the comfort preset for a guest's stay.
$seam->thermostats->schedules->create(
    device_id: $living_room->device_id,
    name: "Jane's stay",
    climate_preset_key: "comfort",
    starts_at: "2026-12-18T15:00:00Z",
    ends_at: "2026-12-22T11:00:00Z",
    is_override_allowed: true,
    max_override_period_minutes: 90,
);
```

```csharp C# theme={"dark"}
var deviceId = (string)livingRoom["device_id"]!;

// Create the climate presets.
await seam.PostAsync<JObject>(
    "/thermostats/create_climate_preset",
    new RequestOptions {
        Data = new {
            device_id = deviceId,
            climate_preset_key = "comfort",
            name = "Comfort",
            hvac_mode_setting = "heat",
            heating_set_point_celsius = 21
        }
    }
);

await seam.PostAsync<JObject>(
    "/thermostats/create_climate_preset",
    new RequestOptions {
        Data = new {
            device_id = deviceId,
            climate_preset_key = "eco",
            name = "Eco",
            hvac_mode_setting = "heat",
            heating_set_point_celsius = 16
        }
    }
);

// Set eco as the fallback climate preset.
await seam.PostAsync<JObject>(
    "/thermostats/set_fallback_climate_preset",
    new RequestOptions {
        Data = new { device_id = deviceId, climate_preset_key = "eco" }
    }
);

// Schedule the comfort preset for a guest's stay.
await seam.PostAsync<JObject>(
    "/thermostats/schedules/create",
    new RequestOptions {
        Data = new {
            device_id = deviceId,
            name = "Jane's stay",
            climate_preset_key = "comfort",
            starts_at = "2026-12-18T15:00:00Z",
            ends_at = "2026-12-22T11:00:00Z",
            is_override_allowed = true,
            max_override_period_minutes = 90
        }
    }
);
```

```bash Seam CLI theme={"dark"}
# Create the climate presets.
seam thermostats create-climate-preset --device_id "11111111-1111-1111-2222-444444444444" --climate_preset_key "comfort" --name "Comfort" --hvac_mode_setting "heat" --heating_set_point_celsius 21
seam thermostats create-climate-preset --device_id "11111111-1111-1111-2222-444444444444" --climate_preset_key "eco" --name "Eco" --hvac_mode_setting "heat" --heating_set_point_celsius 16

# Set eco as the fallback climate preset.
seam thermostats set-fallback-climate-preset --device_id "11111111-1111-1111-2222-444444444444" --climate_preset_key "eco"

# Schedule the comfort preset for a guest's stay.
seam thermostats schedules create --device_id "11111111-1111-1111-2222-444444444444" --name "Jane's stay" --climate_preset_key "comfort" --starts_at "2026-12-18T15:00:00Z" --ends_at "2026-12-22T11:00:00Z" --is_override_allowed true --max_override_period_minutes 90
```

For more about presets and schedules, see [Creating and Managing Climate Presets](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets.md) and [Creating and Managing Thermostat Schedules](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules.md).

***

## Step 5: Connect a real Cielo device

Now that you have learned the basics of using the Seam API, you can connect and control a real Cielo device. To do so, switch to a [non-sandbox workspace](https://www.seam.co/docs/core-concepts/workspaces.md#production-workspaces) and [API key](https://www.seam.co/docs/core-concepts/authentication/api-keys.md).

For the steps your users follow to create a Cielo API key and connect it, see the [Cielo setup guide](https://www.seam.co/docs/device-and-system-integration-guides/cielo-thermostats/cielo-setup-guide.md).

***

## Step 6: Build your application!

The Seam API and Seam SDKs give you up-to-date information about your thermostats. Seam also sends thermostat-related events that let you monitor your thermostats and the connected heating and cooling systems. Our [simulation endpoints](https://www.seam.co/docs/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints.md) help you test your app against events that are hard to reproduce with real devices.

***

## Next steps

Now that you've completed this getting started guide for Cielo devices, you can learn more about what you can do with the Seam API.

* [ ] **Explore**\
  See the [other devices and system integrations](https://www.seam.co/docs/device-and-system-integration-guides.md) that Seam supports.
* [ ] **Learn**\
  Read about Seam [concepts](https://www.seam.co/docs/core-concepts/overview.md) and the [device and system capabilities](https://www.seam.co/docs/capability-guides/device-and-system-capabilities.md) that Seam supports.
* [ ] **Expand your abilities**\
  Find out what other [thermostat actions](https://www.seam.co/docs/capability-guides/thermostats.md) you can perform using the Seam API.
* [ ] **Use webhooks**\
  Learn how to use [webhooks](https://www.seam.co/docs/developer-tools/webhooks.md) as an efficient way to receive device events.

> [!NOTE]
>
> If you have any questions or want to report an issue, email us at
> [support@seam.co](mailto:support@seam.co).

***

## Quick links

> [card] [Get an API Key (free)](https://console.seam.co/)
>
> Sign up for the Seam Console and get your API keys. →

> [card] [Contact Sales](https://www.seam.co/contact-us)
>
> Got a project or a specific question? Contact our team to get answers. →


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.