{
  "pluginAlias": "PrusaLinkDevice",
  "pluginType": "accessory",
  "singular": false,
  "schema": {
    "type": "object",
    "properties": {
      "name": {
        "title": "Name",
        "description": "The name of your printer",
        "type": "string",
        "required": true,
        "default": "Prusa Link"
      },
      "ip": {
        "title": "IP-Address",
        "description": "The ip address of your printer",
        "type": "string",
        "required": true
      },
      "user": {
        "title": "User",
        "description": "The Prusa Link username of your printer",
        "type": "string",
        "required": true,
        "default": "maker"
      },
      "password": {
        "title": "Password",
        "description": "The Prusa Link password of your printer",
        "type": "string",
        "required": true
      },
      "sensorMode": {
        "title": "Sensor Mode",
        "description": "The kind of sensor you want to expose",
        "type": "string",
        "default": "motion",
        "oneOf": [
          {
            "title": "Motion Sensor",
            "enum": [
              "motion"
            ]
          },
          {
            "title": "Occupancy Sensor",
            "enum": [
              "occupancy"
            ]
          }
        ],
        "required": true
      },
      "manufacturer": {
        "title": "Manufacturer",
        "description": "The manufacturer of your printer (probably Prusa)",
        "type": "string",
        "default": "Prusa"
      },
      "serialnumber": {
        "title": "Serial Number",
        "description": "The serial number of your printer",
        "type": "string",
        "default": ""
      },
      "model": {
        "title": "Model",
        "description": "The name of your printer model",
        "type": "string",
        "default": "Printer"
      }
    }
  },
  "layout": [
    {
      "key": "name"
    },
    {
      "key": "ip"
    },
    {
      "key": "user"
    },
    {
      "key": "password"
    },
    {
      "key": "sensorMode"
    },
    {
      "title": "Device Informations",
      "description": "Additional device informations for display only",
      "type": "fieldset",
      "expandable": true,
      "expanded": false,
      "items": [
        "manufacturer",
        "serialnumber",
        "model"
      ]
    }
  ]
}