{
  "pluginAlias": "Flume",
  "pluginType": "platform",
  "singular": true,
  "customUi": true,
  "customUiPath": "./dist/homebridge-ui",
  "schema": {
    "type": "object",
    "required": ["username", "password", "clientId", "clientSecret", "refreshInterval", "units"],
    "properties": {
      "name": {
        "type": "string",
        "default": "Flume"
      },
      "username": {
        "type": "string",
        "title": "Flume Username",
        "required": true
      },
      "password": {
        "type": "string",
        "title": "Flume Password",
        "required": true
      },
      "clientId": {
        "type": "string",
        "title": "Client ID",
        "placeholder": "1234567890ABCD",
        "required": true
      },
      "clientSecret": {
        "type": "string",
        "title": "Client Secret",
        "description": "Your Flume Client ID and Client Secret can be found at https://portal.flumetech.com",
        "placeholder": "1234567890ABCDEFGHIJ",
        "required": true
      },
      "refreshInterval": {
        "type": "integer",
        "title": "Refresh Interval",
        "description": "Number of minutes between requests to Flume for leak information",
        "default": 2,
        "minimum": 1,
        "required": true
      },
      "useNotifications": {
        "type": "boolean",
        "title": "Use Unread Usage Notifications",
        "description": "If true, an unread usage alert notification will be considered a leak"
      },
      "units": {
        "type": "string",
        "title": "Units",
        "description": "Volume units to use for custom characteristics",
        "enum": ["GALLONS", "LITERS", "CUBIC_FEET", "CUBIC_METERS"],
        "enumNames": ["Gallons", "Liters", "Cubic Feet", "Cubic Meters"],
        "default": "GALLONS",
        "required": true
      },
      "disableDeviceLogging": {
        "type": "boolean",
        "title": "Disable Device Logging",
        "description": "If true, then accessory status changes will not be logged",
        "default": false,
        "required": false
      },
      "verbose": {
        "type": "boolean",
        "title": "Verbose",
        "description": "Enable additional debug logging",
        "required": false
      },
      "excludeDevices": {
        "type": "array",
        "title": "Exclude Devices",
        "description": "Look for \"Adding new device: [Device ID]\" in the logs",
        "items": {
          "type": "string"
        },
        "uniqueItems": true,
        "default": [],
        "required": false
      }
    }
  },
  "layout": [
    {
      "type": "fieldset",
      "items": [
        "username",
        "password",
        "clientId",
        "clientSecret",
        "refreshInterval",
        "useNotifications",
        "units",
        "disableDeviceLogging",
        "verbose",
        {
          "key": "excludeDevices",
          "type": "array",
          "items": {
            "type": "string",
            "title": "Device ID"
          }
        }
      ]
    }
  ]
}
