{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/airthings/json-schema/airthings-get-device-detailed-response-enriched-schema.json",
  "title": "GetDeviceDetailedResponse-enriched",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/airthings-devices-api-openapi.yml#/components/schemas/GetDeviceDetailedResponse-enriched",
  "type": "object",
  "properties": {
    "deviceType": {
      "$ref": "#/$defs/DeviceType"
    },
    "id": {
      "type": "string",
      "description": "serial number of the device"
    },
    "location": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/LocationSimpleResponse"
        }
      ]
    },
    "productName": {
      "type": "string"
    },
    "segment": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/SegmentSimpleResponse-enriched",
          "description": "segment the device is in"
        }
      ]
    },
    "sensors": {
      "items": {
        "type": "string",
        "enum": [
          "radonShortTermAvg",
          "radonLongTermAvg",
          "hctsbk",
          "hctsrn222l",
          "hctsrn222h",
          "hctssa",
          "hctspo21xl",
          "hctspo21xh",
          "hctscomparator",
          "hctsprocessed",
          "temp",
          "outdoorTemp",
          "humidity",
          "outdoorHumidity",
          "co2",
          "voc",
          "pressure",
          "outdoorPressure",
          "pressureDifference",
          "light",
          "lux",
          "batteryPercentage",
          "batteryVoltage",
          "orientation",
          "pm1",
          "pm25",
          "pm10",
          "mold",
          "staleAir",
          "transmissionEfficiency",
          "virusSurvivalRate",
          "virusRisk",
          "windSpeed",
          "windDirection",
          "windGust",
          "dewPoint",
          "cloudCover",
          "visibility",
          "precipitation_probability",
          "total_precipitation",
          "outdoorWeather",
          "hourlyRadonStandardDeviation",
          "hourlyRadon",
          "historicVentilationConfidence",
          "daytimeBaseline",
          "daytimePeak",
          "nightBaseline",
          "historicVentilation",
          "ventilationRunningConfidence",
          "occupantsUpper",
          "occupantsLower",
          "presence",
          "occupants",
          "relativeOccupants",
          "ventilationAmount",
          "historicVentilationRunning",
          "ventilationRunning",
          "ventilationAmountRelative",
          "airExchangeRateUpper",
          "airExchangeRateLower",
          "airExchangeRate",
          "sla",
          "bacnet"
        ]
      },
      "type": "array"
    }
  },
  "required": [
    "deviceType",
    "id",
    "productName",
    "sensors"
  ],
  "$defs": {
    "DeviceType": {
      "type": "string",
      "enum": [
        "WAVE",
        "WAVE_GEN2",
        "WAVE_MINI",
        "WAVE_PLUS",
        "WAVE_CO2",
        "VIEW_PLUS",
        "VIEW_PLUS_BUSINESS",
        "VIEW_POLLUTION",
        "VIEW_RADON",
        "VIEW_CO2",
        "SPACE_CO2_MINI",
        "SPACE_RADON",
        "WAVE_NANO",
        "WAVE_ENHANCE",
        "HUB",
        "HOME",
        "HOME_COLIBRI",
        "PRO",
        "BREEZOMETER_WEATHER",
        "BACNET",
        "AP_1",
        "RAVEN_RADON",
        "UNKNOWN"
      ]
    },
    "LocationSimpleResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ]
    },
    "SegmentSimpleResponse-enriched": {
      "type": "object",
      "properties": {
        "active": {
          "type": "boolean"
        },
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "name": {
          "type": "string"
        },
        "spaceId": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "type": "string",
              "format": "uuid",
              "description": "Space ID where the device segment is/was located. It is null for old ended non-space segments"
            }
          ]
        },
        "started": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "active",
        "id",
        "name",
        "started"
      ]
    }
  }
}