{
  "pluginAlias": "MijiaThermometer",
  "pluginType": "accessory",
  "singular": false,
  "headerDisplay": null,
  "schema": {
    "type": "object",
    "properties": {
      "name": {
        "title": "Accessory Name",
        "type": "string",
        "format": "string",
        "default": "Temperature & Humidity",
        "minLength": 1,
        "required": true
      },
      "address": {
        "title": "Device MAC Address",
        "type": "string",
        "format": "string",
        "placeholder": "e.g. 00:00:00:00:00:00",
        "description": "Required. MAC Address of the device.",
        "required": true
      },
      "bindKey": {
        "title": "Bind Key",
        "type": "string",
        "format": "string",
        "description": "Required. Key for decrypting BLE data. <a href=\"https://github.com/mKeRix/room-assistant/issues/277\" target=\"_blank\">Guide to retrieve</a>",
        "required": true
      },
      "temperatureName": {
        "title": "Custom Name - Temperature",
        "type": "string",
        "format": "string",
        "default": "Temperature"
      },
      "humidityName": {
        "title": "Custom Name - Humidity",
        "type": "string",
        "format": "string",
        "default": "Humidity"
      },
      "lowBattery": {
        "title": "Low Battery Threshold",
        "type": "integer",
        "default": 10,
        "description": "At what battery percentage Homekit should start warning about low battery."
      },
      "temperatureOffset": {
        "title": "Offset - Temperature",
        "type": "integer",
        "default": 0,
        "description": "An offset to apply to temperature values for calibration if measured values are incorrect."
      },
      "humidityOffset": {
        "title": "Offset - Humidity",
        "type": "integer",
        "default": 0,
        "description": "An offset to apply to humidity values for calibration if measured values are incorrect."
      }
    }
  },
  "layout": [
    {
      "type": "flex",
      "flex-flow": "row wrap",
      "items": [
        "name"
      ]
    },
    {
      "type": "flex",
      "flex-flow": "row wrap",
      "items": [
        "address"
      ]
    },
    {
      "type": "flex",
      "flex-flow": "row wrap",
      "items": [
	"bindKey"
      ]
    },
    {
      "type": "flex",
      "flex-flow": "row wrap",
      "items": [
        "temperatureName",
        "humidityName"
      ]
    },
    {
      "type": "fieldset",
      "title": "Advanced configuration",
      "expandable": true,
      "items": [
        "lowBattery",
        "temperatureOffset",
        "humidityOffset"
      ]
    }
  ]
}
