{
	"pluginAlias": "CyncAppPlatform",
	"pluginType": "platform",
	"customUi": true,
	"singular": true,
	"schema": {
		"type": "object",
		"properties": {
			"name": {
				"title": "Name",
				"type": "string",
				"default": "Cync",
				"description": "Name of the platform as shown in Homebridge."
			},
			"username": {
				"title": "Cync Email",
				"type": "string",
				"format": "email",
				"description": "Email address you use to sign in to the Cync app."
			},
			"password": {
				"title": "Cync Password",
				"type": "string",
				"format": "password",
				"description": "Password for your Cync account."
			},
			"twoFactor": {
				"title": "Two-Factor Code (OTP)",
				"type": "string",
				"pattern": "^[0-9]{6}$",
				"description": "Temporary 6-digit code emailed by Cync when you sign in. Leave blank normally; only needed when performing a fresh login."
			},
			"unreachableStatePolicy": {
				"title": "Unreachable Accessory State",
				"type": "string",
				"default": "no-response",
				"oneOf": [
					{ "title": "Show No Response", "enum": ["no-response"] },
					{ "title": "Assume Off", "enum": ["assume-off"] },
					{ "title": "Keep Cached State", "enum": ["cached"] }
				],
				"description": "How HomeKit should represent an accessory that has not reported state within the timeout. No Response is the most accurate default."
			},
			"unreachableTimeoutSeconds": {
				"title": "Unreachable Timeout",
				"type": "integer",
				"default": 600,
				"minimum": 30,
				"maximum": 3600,
				"description": "Seconds since the last device update before the accessory is treated as unreachable."
			},
			"deviceShowConfigs": {
				"title": "Shows by Device",
				"type": "array",
				"items": {
					"type": "object",
					"properties": {
						"deviceId": { "type": "string" },
						"lightShowIndexes": {
							"type": "array",
							"items": { "type": "number" },
							"uniqueItems": true
						},
						"musicShowIndexes": {
							"type": "array",
							"items": { "type": "number" },
							"uniqueItems": true
						},
						"customLightShowIndexes": {
							"type": "array",
							"items": { "type": "number" },
							"uniqueItems": true
						},
						"customMusicShowIndexes": {
							"type": "array",
							"items": { "type": "number" },
							"uniqueItems": true
						},
						"multiColorSchemeIndexes": {
							"type": "array",
							"items": { "type": "number" },
							"uniqueItems": true
						}
					},
					"required": ["deviceId"]
				},
				"uniqueItems": true,
				"default": [],
				"description": "Per-device show selections managed by the custom plugin UI."
			}
		},
		"required": [
			"name",
			"username",
			"password"
		]
	}
}
