{
  "pluginAlias": "FaberRangeHood",
  "pluginType": "platform",
  "singular": true,
  "strictValidation": true,
  "schema": {
    "type": "object",
    "required": ["auth_mode"],
    "additionalProperties": false,
    "properties": {
      "name": {
        "title": "Name",
        "type": "string",
        "default": "Faber Range Hood"
      },
      "auth_mode": {
        "title": "Auth Mode",
        "type": "string",
        "default": "token",
        "oneOf": [
          {
            "title": "Token",
            "enum": [
              "token"
            ]
          }
        ]
      },
      "refresh_token": {
        "title": "Refresh Token",
        "type": "string",
        "placeholder": "eyJraWQiO...",
        "condition": {
          "functionBody": "return model.auth_mode === 'token';"
        }
      },
      "devices": {
        "type": "array",
        "items": {
          "type": "object",
          "required": ["id"],
          "properties": {
            "name": {
              "title": "Device Name (Optional)",
              "type": "string",
              "default": "",
              "placeholder": ""
            },
            "id": {
              "title": "Device ID",
              "type": "string",
              "placeholder": "PINb12jghtk23D9WEoweif"
            }
          }
        }
      }
    }
  }
}
