{
  "pluginAlias": "Ring",
  "pluginType": "platform",
  "headerDisplay": "See [the wiki](https://github.com/dgreif/ring/wiki/Refresh-Tokens) for details on generating a refresh token",
  "accountLinkingHeader": "Please supply your Ring credentials.  These will be used to contact the Ring servers and generate a unique access token for your account.  Your email and password will be sent directly to Ring and will not be stored anywhere.",
  "schema": {
    "type": "object",
    "properties": {
      "refreshToken": {
        "title": "Refresh Token",
        "type": "string",
        "description": "Refresh token generated by ring-auth-cli",
        "placeholder": "Refresh Token"
      },
      "alarmOnEntryDelay": {
        "title": "Alarm on Entry Delay",
        "type": "boolean",
        "description": "If enabled, HomeKit will register a delayed entry event as a triggered alarm. Useful if you want to know as soon as someone opens a door with the alarm armed"
      },
      "hideLightGroups": {
        "title": "Hide Light Groups",
        "type": "boolean",
        "description": "Hides Ring lighting groups, allowing you to group lights differently in HomeKit than how you group them in the Ring app"
      },
      "hideDoorbellSwitch": {
        "title": "Hide Doorbell Programmable Switch",
        "type": "boolean",
        "description": "Hides the Programmable Switch for Ring doorbells.  This switch is only useful for triggering an automation when the doorbell is pressed, so most users can safely hide it"
      },
      "hideCameraMotionSensor": {
        "title": "Hide Camera Motion Sensors",
        "type": "boolean"
      },
      "hideCameraSirenSwitch": {
        "title": "Hide Camera Siren Switch",
        "type": "boolean"
      },
      "hideInHomeDoorbellSwitch": {
        "title": "Hide In-Home Doorbell Switch",
        "type": "boolean"
      },
      "hideAlarmSirenSwitch": {
        "title": "Hide Alarm Siren Switch",
        "type": "boolean",
        "description": "Hides switch that allows you to turn on the siren of the Ring Alarm.  Enable this is your Siri commands keep setting off the siren and you don't care about having the switch"
      },
      "hideUnsupportedServices": {
        "title": "Hide Unsupported Services",
        "type": "boolean",
        "description": "Hides the alarm Base Station and Keypad devices in HomeKit.  These are only supported by third-party HomeKit apps, not the native Home app."
      },
      "showPanicButtons": {
        "title": "Show Panic Buttons",
        "type": "boolean",
        "description": "Creates a new `Panic Buttons` device in HomeKit with `Burglar Alarm` and `Fire Alarm` switches.  **Use these at your own risk.  I do not guarantee functionality in case of emergency, nor do I take responsibility for any false alarms**.  These function just like the SOS sliders in the Ring app."
      },
      "beamDurationSeconds": {
        "title": "Ring Smart Lighting Timer",
        "type": "integer",
        "minimum": 1,
        "maximum": 32767,
        "description": "Ring Smart Lighting will only stay on for a set amount of time.  You can specify that duration here (in seconds).  If not specified, the light will stay on for the last duration used within the Ring app for individual lights, and 60 seconds for lighting groups.  Max value is 32767 which is ~9.1 hours"
      },
      "debug": {
        "title": "Debug Logging",
        "type": "boolean",
        "description": "Turns on additional logging.  In particular, ffmpeg logging."
      },
      "cameraStatusPollingSeconds": {
        "title": "Camera Status Polling",
        "type": "integer",
        "minimum": 1,
        "placeholder": "Get camera status every __ seconds",
        "description": "Camera status (such as light/siren state) does not update live and must be fetched periodically.  By default this is done every 20 seconds"
      },
      "cameraDingsPollingSeconds": {
        "title": "Camera Event Polling",
        "type": "integer",
        "minimum": 1,
        "placeholder": "Get camera events every __ seconds",
        "description": "Camera motion and ding events does not update live and must be fetched periodically.  By default this is done every 2 seconds"
      },
      "locationModePollingSeconds": {
        "title": "Location Mode Polling",
        "type": "integer",
        "minimum": 1,
        "placeholder": "Get current Location Mode every __ seconds",
        "description": "Location Modes do not update live and must be fetched periodically.  By default this is done every 20 seconds for locations that have Location Modes enabled, and that do not have a Ring Alarm"
      },
      "locationIds": {
        "title": "Location ID",
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    "required": ["refreshToken"]
  },
  "layout": [
    {
      "type": "flex",
      "flex-flow": "row wrap",
      "items": ["refreshToken"]
    },
    {
      "type": "fieldset",
      "title": "Optional Configuration - Only adjust these if you actually need to",
      "expandable": true,
      "items": [
        "alarmOnEntryDelay",
        "hideLightGroups",
        "hideDoorbellSwitch",
        "hideCameraMotionSensor",
        "hideCameraSirenSwitch",
        "hideInHomeDoorbellSwitch",
        "hideAlarmSirenSwitch",
        "hideUnsupportedServices",
        "showPanicButtons",
        "beamDurationSeconds",
        "debug",
        "cameraStatusPollingSeconds",
        "cameraDingsPollingSeconds",
        "locationModePollingSeconds",
        {
          "key": "locationIds",
          "add": "Add Another Location ID",
          "type": "array",
          "items": [
            {
              "type": "div",
              "displayFlex": true,
              "flex-direction": "row",
              "items": [
                {
                  "key": "locationIds[]",
                  "placeholder": "Location ID"
                }
              ]
            }
          ]
        },
        {
          "type": "help",
          "helpvalue": "<p>If you have multiple locations configured in Ring but only want some of them in HomeKit, enter the desired location IDs above.  The ID for each location is logged every time homebridge starts.</p>"
        }
      ]
    }
  ]
}
