Skip to main content

Overview

Configure the temperature range for heat-cool (auto) mode. The thermostat will heat when below the low threshold and cool when above the high threshold.
Hosted service only. This endpoint is part of the hosted API at https://nolongerevil.com/api/v1 and requires an nle_ API key. It is not available on the self-hosted server.

Endpoint

POST https://nolongerevil.com/api/v1/thermostat/{deviceId}/temperature/range

Authentication

Required Scopes: write

Request Body

FieldTypeRequiredDescription
lownumberYesMinimum temperature (heating threshold)
highnumberYesMaximum temperature (cooling threshold)
scalestringNo"C" (default) or "F"
{
  "low": 68,
  "high": 74,
  "scale": "F"
}
low must be less than high. Most thermostats require at least 2-3°F (1-2°C) difference.

Response

Success (200 OK):
{
  "success": true,
  "message": "Command handled",
  "device": "02AA01AB01234567",
  "object": "shared.02AA01AB01234567",
  "revision": 154,
  "timestamp": 1764026400108
}

Code Examples

curl -X POST https://nolongerevil.com/api/v1/thermostat/dev_abc123xyz/temperature/range \
  -H "Authorization: Bearer nle_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"low": 68, "high": 74, "scale": "F"}'

Use Cases

Comfort Range

// Maintain 68-74°F for optimal comfort
await setTemperatureRange(deviceId, 68, 74, 'F');

Energy Efficiency

// Wider range = less HVAC cycling = energy savings
await setTemperatureRange(deviceId, 65, 78, 'F');

Next Steps

Set Mode

Switch to heat-cool mode

Set Temperature

Set single temperature