{
	"pluginAlias": "Panasonic AC Platform",
	"pluginType": "platform",
	"singular": true,
	"headerDisplay": "Homebridge plugin for Panasonic Comfort Cloud.",
        "footerDisplay": "For additonal information visit [Plugin Homepage](https://github.com/homebridge-panasonic-ac-platform/homebridge-panasonic-ac-platform).",
	"schema": {
		"type": "object",
		"properties": {
			"email": {
				"title": "Email",
				"type": "string",
				"placeholder": "Email",
				"required": true,
				"format": "email",
				"description": "The username of your Comfort Cloud (Panasonic ID) account."
			},
			"password": {
				"title": "Password",
				"type": "string",
				"placeholder": "Password",
				"required": true,
				"description": "The password of your Comfort Cloud (Panasonic ID) account."
			},
			"key2fa": {
				"title": "2FA key",
				"type": "string",
				"description": "2FA key received from Panasonic (32 characters). Note: This field is currently not required to make this plugin work, but Panasonic already requires 2FA (code or SMS, recommended code) to log in to Comfort Cloud, so it may be required soon.",
				"required": false
			},
			"name": {
				"title": "Plugin Name",
				"description": "Name of the plugin displayed in Homebridge log and as plugin bridge name.",
				"type": "string",
				"default": "Panasonic AC Platform",
				"placeholder": "Panasonic AC Platform",
				"required": true
			},
			"overwriteVersion": {
				"title": "Overwrite Version",
				"description": "Overwrite version - must be equal to newest Panasonic Comfort Cloud app version from App Store or Play Store. E.G: 1.21.1 .",
				"type": "string",
				"default": "",
				"placeholder": "",
				"required": false
			},
			"suppressOutgoingUpdates": {
				"title": "Suppress outgoing devices updates",
				"description": "When enabled, changes in the Home app will not be sent to Comfort Cloud. Useful for testing your installation without constantly switching the state of your AC.",
				"type": "boolean"
			},
			"logsLevel": {
				"title": "Logs Level",
				"description": "Logs level. 0 - only errors and important info, 1 - standard, 2 - all (including debug). Note: to see debug messages in logs it is also required to enable Debug in Homebridge Settings.",
				"type": "integer",
				"default": "1",
				"oneOf": [
					{
						"title": "Only errors and important info",
						"enum": [
							0
						]
					},
					{
						"title": "Standard",
						"enum": [
							1
						]
					},
					{
						"title": "All (including debug)",
						"enum": [
							2
						]
					}
				],
				"required": true
			},
			"devices": {
				"type": "array",
				"items": {
					"type": "object",
					"properties": {
						"name": {
							"title": "Name or serial number",
							"type": "string",
							"required": true,
							"description": "Device name (as it is in Comfort Cloud account) or serial (E.G.: CS-Z50VKEW+2462503161). Devices names and serial numbers are displayed in Homebridge log after restart, names can be also found in Panasonic Comfort Cloud app, serial numbers can be also found on the stickers on the devices."
						},
						"excludeDevice": {
							"title": "Exclude device",
							"description": "Exclude device from Homebridge and HomeKit (it will stay in Comfort Cloud).",
							"type": "boolean",
							"default": false
						},
						"swingDefaultUD": {
							"title": "Swing Mode Default Position (Up-Down)",
							"description": "Desired position of the Up-Down flaps when swing is switched off.",
							"type": "integer",
							"default": 2,
							"oneOf": [
								{
									"title": "Up",
									"enum": [
										0
									]
								},
								{
									"title": "Center-Up",
									"enum": [
										3
									]
								},
								{
									"title": "Center",
									"enum": [
										2
									]
								},
								{
									"title": "Center-Down",
									"enum": [
										4
									]
								},
								{
									"title": "Down",
									"enum": [
										1
									]
								}
							],
							"required": true
						},
						"swingDefaultLR": {
							"title": "Swing Mode Default Position (Left-Right)",
							"description": "Desired position of the Left-Right flaps when swing is switched off.",
							"type": "integer",
							"default": 2,
							"oneOf": [
								{
									"title": "Left",
									"enum": [
										0
									]
								},
								{
									"title": "Center-Left",
									"enum": [
										4
									]
								},
								{
									"title": "Center",
									"enum": [
										2
									]
								},
								{
									"title": "Center-Right",
									"enum": [
										3
									]
								},
								{
									"title": "Right",
									"enum": [
										1
									]
								}
							],
							"required": true
						},
						"minHeatingTemperature": {
							"title": "Minimum heating temperature (override)",
							"description": "The default heating temperature range is 16-30°C. Some Panasonic ACs have an additional heating mode for the range of 8-15°C. You can use this setting to adjust the minimum value. Leave it empty to use the default value.",
							"type": "integer",
							"placeholder": "16"
						},
						"exposeInsideTemp": {
							"title": "Expose Inside Temp.",
							"description": "When enabled it will create a virtual temperature sensor which will display the temperature from inside unit. This can be used for monitoring or automation purposes. Note: It is recomended to use external temperature sensor (not built-in in AC).",
							"type": "boolean",
							"default": false
						},
						"exposeOutdoorTemp": {
							"title": "Expose Outdoor Temp.",
							"description": "When enabled it will create a virtual temperature sensor which will display the temperature from outdoor unit. This can be used for monitoring or automation purposes. Note: It may be required for the device to be turned on to retrieve the current temperature from the outdoor unit.",
							"type": "boolean",
							"default": false
						},
						"exposePower": {
							"title": "Expose Power (On/Off)",
							"description": "When enabled it will create a switch to control Power (On/Off).",
							"type": "boolean",
							"default": false
						},
						"exposeNanoe": {
							"title": "Expose Nanoe",
							"description": "When enabled it will create a switch to control Nanoe.",
							"type": "boolean",
							"default": false
						},
						"exposeInsideCleaning": {
							"title": "Expose Inside Cleaning",
							"description": "When enabled it will create a switch to control Inside Cleaning.",
							"type": "boolean",
							"default": false
						},
						"exposeEcoNavi": {
							"title": "Expose Eco Navi",
							"description": "When enabled it will create a switch to control Eco Navi.",
							"type": "boolean",
							"default": false
						},
						"exposeEcoFunction": {
							"title": "Expose Eco Function",
							"description": "When enabled it will create a switch to control Eco Function.",
							"type": "boolean",
							"default": false
						},
						"exposeAutoMode": {
							"title": "Expose Auto Mode",
							"description": "When enabled it will create a switch to control Auto Mode.",
							"type": "boolean",
							"default": false
						},
						"exposeCoolMode": {
							"title": "Expose Cool Mode",
							"description": "When enabled it will create a switch to control Cool Mode.",
							"type": "boolean",
							"default": false
						},
						"exposeHeatMode": {
							"title": "Expose Heat Mode",
							"description": "When enabled it will create a switch to control Heat Mode.",
							"type": "boolean",
							"default": false
						},
						"exposeDryMode": {
							"title": "Expose Dry Mode",
							"description": "When enabled it will create a switch to control Dry Mode.",
							"type": "boolean",
							"default": false
						},
						"exposeFanMode": {
							"title": "Expose Fan Mode",
							"description": "When enabled it will create a switch to control Fan Mode.",
							"type": "boolean",
							"default": false
						},
						"exposeNanoeStandAloneMode": {
							"title": "Expose Nanoe Stand Alone Mode",
							"description": "When enabled it will create a switch to control Nanoe Stand Alone Mode.",
							"type": "boolean",
							"default": false
						},
						"exposeQuietMode": {
							"title": "Expose Quiet Mode",
							"description": "When enabled it will create a switch to control Quiet Mode. Quiet Mode can also be enabled by setting the speed slider (rotation) to 1.",
							"type": "boolean",
							"default": false
						},
						"exposePowerfulMode": {
							"title": "Expose Powerful Mode",
							"description": "When enabled it will create a switch to control Powerful Mode. Powerful Mode can also be enabled by setting the speed slider (rotation) to 7.",
							"type": "boolean",
							"default": false
						},
						"exposeSwingUpDown": {
							"title": "Expose Swing Up Down",
							"description": "When enabled it will create a switch to control Swing Up Down.",
							"type": "boolean",
							"default": false
						},
						"exposeSwingLeftRight": {
							"title": "Expose Swing Left Right",
							"description": "When enabled it will create a switch to control Swing Left Right.",
							"type": "boolean",
							"default": false
						},
						"exposeFanSpeed": {
							"title": "Expose Fan Speed",
							"description": "When enabled it will create a switch to control Fan Speed. Value 0 will turn device off, value from 1 to 20 = speed 1, value from 21 to 40 = speed 2, value from 41 to 60 = speed 3, value from 61 to 80 = speed 4, value from 81 to 99 = speed 5 and value 100 = speed auto. Note: changing value will turn off Quiet / Powerful mode.",
							"type": "boolean",
							"default": false
						}
					}
				}
			}
		}
	},
	"layout": [
		{
			"type": "fieldset",
			"title": "Account",
			"description": "Comfort Cloud (Panasonic ID) account details.",
			"expandable": true,
			"expanded": false,
			"items": [
				"email",
				"password",
				"key2fa"
			]
		},
		{
			"type": "fieldset",
			"title": "Logs and debug",
			"description": "Logs level and other debug options.",
			"expandable": true,
			"expanded": false,
			"items": [
				"logsLevel",
				"name",
				"suppressOutgoingUpdates",
				"overwriteVersion"
			]
		},
		{
			"type": "array",
			"key": "devices",
			"title": "Devices",
			"description": "All devices are automatically added from Comfort Cloud. Here add only those devices for which you want to apply individual settings.",
			"buttonText": "Add device",
			"expandable": true,
			"expanded": false,
			"items": [
				{
					"type": "fieldset",
					"items": [
						{
							"type": "fieldset",
							"title": "Device",
							"description": "General device settings.",
							"flex": "1 1 100%",
							"expandable": true,
							"expanded": false,
							"items": [
								"devices[].name",
								"devices[].excludeDevice",
								"devices[].minHeatingTemperature"
							]
						},
						{
							"type": "fieldset",
							"title": "Sensors and switches",
							"description": "Expose additional sensors and switches.",
							"flex": "1 1 100%",
							"expandable": true,
							"expanded": false,
							"items": [
								{
									"type": "section",
									"title": "Temp. sensors",
									"flex": "1 1 100%",
									"expandable": true,
									"expanded": false,
									"items": [
										"devices[].exposeInsideTemp",
										"devices[].exposeOutdoorTemp"
									]
								},
								{
									"type": "section",
									"title": "Mode",
									"flex": "1 1 100%",
									"expandable": true,
									"expanded": false,
									"items": [
										"devices[].exposePower",
										"devices[].exposeAutoMode",
										"devices[].exposeCoolMode",
										"devices[].exposeHeatMode",
										"devices[].exposeDryMode",
										"devices[].exposeFanMode",
										"devices[].exposeNanoeStandAloneMode"
									]
								},
								{
									"type": "section",
									"title": "Speed",
									"flex": "1 1 100%",
									"expandable": true,
									"expanded": false,
									"items": [
										"devices[].exposeQuietMode",
										"devices[].exposePowerfulMode",
										"devices[].exposeFanSpeed"
									]
								},
								{
									"type": "section",
									"title": "Swing",
									"flex": "1 1 100%",
									"expandable": true,
									"expanded": false,
									"items": [
										"devices[].exposeSwingUpDown",
										"devices[].exposeSwingLeftRight"
									]
								},
								{
									"type": "section",
									"title": "Extra functions",
									"flex": "1 1 100%",
									"expandable": true,
									"expanded": false,
									"items": [
										"devices[].exposeNanoe",
										"devices[].exposeInsideCleaning",
										"devices[].exposeEcoNavi",
										"devices[].exposeEcoFunction"
									]
								}
							]
						},
						{
							"type": "fieldset",
							"title": "Swing (oscilate) desired positions",
							"description": "Set desired positions for swing mode (up-down and left-right).",
							"flex": "1 1 100%",
							"expandable": true,
							"expanded": false,
							"items": [
								"devices[].swingDefaultUD",
								"devices[].swingDefaultLR"
							]
						}
					]
				}
			]
		}
	]
}
