{
  "pluginAlias": "PentairHomebridge",
  "pluginType": "platform",
  "singular": true,
  "schema": {
    "type": "object",
    "required": ["name", "email", "password"],
    "properties": {
      "name": {
        "title": "Plugin Name",
        "type": "string",
        "default": "Pentair Cloud"
      },
      "email": {
        "title": "Pentair Account Email",
        "type": "string",
        "format": "email"
      },
      "password": {
        "title": "Pentair Account Password",
        "type": "string",
        "x-schema-form": {
          "type": "password"
        }
      },
      "pump": {
        "title": "Pool Pump",
        "type": "object",
        "properties": {
          "name": {
            "title": "Accessory Name",
            "type": "string",
            "default": "Pool Pump"
          },
          "deviceId": {
            "title": "Device ID",
            "type": "string"
          }
        }
      },
      "light": {
        "title": "Pool Light",
        "type": "object",
        "properties": {
          "name": {
            "title": "Accessory Name",
            "type": "string",
            "default": "Pool Light"
          },
          "deviceId": {
            "title": "Device ID",
            "type": "string"
          }
        }
      },
      "debugLogging": {
        "title": "Debug Logging",
        "type": "boolean",
        "default": false,
        "description": "Log raw device status responses at INFO level. Enable temporarily to diagnose status not updating."
      }
    }
  },
  "form": [
    {
      "type": "section",
      "title": "Pentair Account",
      "expandable": false,
      "items": ["email", "password"]
    },
    {
      "type": "section",
      "title": "Pool Pump (optional)",
      "expandable": true,
      "expanded": false,
      "items": ["pump"]
    },
    {
      "type": "section",
      "title": "Pool Light (optional)",
      "expandable": true,
      "expanded": false,
      "items": ["light"]
    },
    {
      "type": "section",
      "title": "Advanced",
      "expandable": true,
      "expanded": false,
      "items": ["debugLogging"]
    }
  ]
}
