{
  "pluginAlias": "AirGradientPlatform",
  "pluginType": "platform",
  "headerDisplay": "AirGradient Configuration",
  "schema": {
    "type": "object",
    "properties": {
      "sensors": {
        "type": "array",
        "title": "AirGradient Sensors",
        "items": {
          "type": "object",
          "properties": {
            "serialno": {
              "title": "Serial Number",
              "type": "string",
              "required": true
            },
            "pollingInterval": {
              "title": "Polling Interval (ms)",
              "type": "number",
              "default": 60000,
              "minimum": 1000
            },
            "useCompensatedValues": {
              "title": "Use Compensated Values",
              "type": "boolean",
              "default": false
            }
          }
        }
      }
    }
  },
  "layout": [
    {
      "type": "section",
      "items": [
        {
          "key": "sensors",
          "type": "array",
          "add": "Add Sensor",
          "items": [
            {
              "key": "sensors[].serialno",
              "placeholder": "Enter your Serial Number"
            },
            {
              "key": "sensors[].pollingInterval",
              "placeholder": 60000
            },
            {
              "key": "sensors[].useCompensatedValues",
              "type": "checkbox",
              "title": "Use Compensated Values"
            }
          ]
        }
      ]
    }
  ]
}
