{
  "pluginAlias": "SwitcherPlatform",
  "pluginType": "platform",
  "singular": true,
  "headerDisplay": "Homebridge plugin for Switcher smart accessories - if you're having troubles installing the plugin, please Read the <a target=\"_blank\" href=\"https://github.com/nitaybz/homebridge-switcher-platform/blob/master/README.md\">README.md</a> file fully, and submit an issue if the problem persist",
  "footerDisplay": "Created by @nitaybz",
  "schema": {
      "type": "object",
      "properties": {
          "name": {
              "title": "Plugin Name (for logs)",
              "type": "string",
              "default": "Switcher Platform",
              "required": false
          },
          "token": {
              "title": "Token",
              "description": "Some devices require a token to operate, the token can be acquired from this link: <a target=\"_blank\" href=\"https://switcher.co.il/GetKey/\">https://switcher.co.il/GetKey/</a>",
              "type": "string",
              "required": false
          },
          "debug": {
              "title": "Enable Debug Logs",
              "description": "When checked, the plugin will produce extra logs for debugging purposes",
              "type": "boolean",
              "default": false,
              "required": false
          },
          "secondsToRemove": {
              "title": "Seconds to remove disconnected device",
              "description": "Time in seconds to remove a device if it has not being discovered (default is 10 minutes). set 0 to not remove accessories at all.",
              "type": "integer",
              "default": 0,
              "required": false
          },
          "devices": {
              "type": "array",
              "required": false,
              "items": {
                "title": "Custom Devices Settings",
                "type": "object",
                "properties": {
                  "identifier": {
                      "title": "Identifier (Device ID, device IP or Device Name)",
                      "description": "Identifier is needed to set custom settings for a specific device. use one of the above as identifier so the plugin will know which device you wish to setup",
                      "type": "string",
                      "required": true
                  },
                  "accessoryType": {
                      "title": "Accessory Type",
                      "description": "Accessory Type and Icon for this specific device - affect functionality (read more in the <a target=\"_blank\" href=\"https://github.com/nitaybz/homebridge-switcher-platform/blob/master/README.md\">README.md</a> file)",
                      "type": "string",
                      "required": false,
                      "oneOf": [
                        { "title": "Switch", "enum": ["switch"] },
                        { "title": "Outlet", "enum": ["outlet"] },
                        { "title": "Water Valve", "enum": ["valve"] }
                      ]
                  },
                  "hide": {
                      "title": "Hide Device",
                      "description": "Enable to remove this device from HomeKit",
                      "type": "boolean",
                      "required": false
                  }

                }
              }
          },
          "customTimers": {
              "type": "array",
              "required": false,
              "items": {
                "title": "Custom Timers for Boiler",
                "type": "object",
                "properties": {
                  "identifier": {
                      "title": "Identifier (Device ID, device IP or Device Name)",
                      "description": "Identifier is needed to set custom timer for a specific device. use one of the above as identifier so the plugin will know which device you wish to control",
                      "type": "string",
                      "required": true
                  },
                  "shutdownMinutes": {
                      "title": "Shutdown in Minutes",
                      "description": "Define how many minutes to run the boiler ON before shutting it OFF automatically",
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 300,
                      "required": true
                  }
                }
              }
          }
      }
  },
    "layout": [
      {
        "key": "name"
      },
      {
        "key": "token"
      },
      {
        "key": "debug"
      },
      {
        "key": "secondsToRemove"
      },
      {
        "key": "devices",
        "type": "array",
        "title": "Custom Devices Settings",
        "orderable": false,
        "buttonText": "Add Device",
        "expandable": true,
        "expanded": false,
        "items": [
          "devices[].identifier",
          "devices[].accessoryType",
          "devices[].hide"
          ]
      },
      {
        "key": "customTimers",
        "type": "array",
        "title": "Custom Timer for Boiler",
        "orderable": false,
        "buttonText": "Add Custom Timer",
        "expandable": true,
        "expanded": false,
        "items": [
          "customTimers[].identifier",
          "customTimers[].shutdownMinutes"
          ]
      }
    ]
} 