{
  "pluginAlias": "melcloudcontrol",
  "pluginType": "platform",
  "singular": true,
  "fixArrays": true,
  "strictValidation": true,
  "customUi": true,
  "headerDisplay": "Plugin for Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation connected to MELCloud and MELCloud Home. Devices are exposed to HomeKit as separate accessories and each needs to be manually [paired](https://github.com/grzegorz914/homebridge-melcloud-control/wiki#adding-to-homekit).",
  "footerDisplay": "For documentation please see [GitHub repository](https://github.com/grzegorz914/homebridge-melcloud-control).",
  "schema": {
    "type": "object",
    "properties": {
      "name": {
        "title": "Platform",
        "type": "string",
        "default": "MELCloud Control"
      },
      "accounts": {
        "type": "array",
        "title": "Accounts",
        "items": {
          "type": "object",
          "title": "Account",
          "properties": {
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Name",
              "description": "Your own account name displayed in HomeKit."
            },
            "user": {
              "title": "User",
              "type": "string",
              "placeholder": "Email",
              "description": "Account credential (username)."
            },
            "passwd": {
              "title": "Password",
              "type": "string",
              "placeholder": "Password",
              "description": "Account credential (password).",
              "format": "password"
            },
            "language": {
              "title": "Language",
              "type": "string",
              "minLength": 1,
              "maxLength": 2,
              "pattern": "^[0-9]+$",
              "default": "0",
              "description": "Here select the account language.",
              "anyOf": [
                {
                  "title": "English",
                  "enum": [
                    "0"
                  ]
                },
                {
                  "title": "Български",
                  "enum": [
                    "1"
                  ]
                },
                {
                  "title": "Čeština",
                  "enum": [
                    "2"
                  ]
                },
                {
                  "title": "Dansk",
                  "enum": [
                    "3"
                  ]
                },
                {
                  "title": "Deutsch",
                  "enum": [
                    "4"
                  ]
                },
                {
                  "title": "Eesti",
                  "enum": [
                    "5"
                  ]
                },
                {
                  "title": "Español",
                  "enum": [
                    "6"
                  ]
                },
                {
                  "title": "Français",
                  "enum": [
                    "7"
                  ]
                },
                {
                  "title": "Հայերեն",
                  "enum": [
                    "8"
                  ]
                },
                {
                  "title": "Latviešu",
                  "enum": [
                    "9"
                  ]
                },
                {
                  "title": "Lietuvių",
                  "enum": [
                    "10"
                  ]
                },
                {
                  "title": "Magyar",
                  "enum": [
                    "11"
                  ]
                },
                {
                  "title": "Nederlands",
                  "enum": [
                    "12"
                  ]
                },
                {
                  "title": "Norwegian",
                  "enum": [
                    "13"
                  ]
                },
                {
                  "title": "Polski",
                  "enum": [
                    "14"
                  ]
                },
                {
                  "title": "Português",
                  "enum": [
                    "15"
                  ]
                },
                {
                  "title": "Русский",
                  "enum": [
                    "16"
                  ]
                },
                {
                  "title": "Suomi",
                  "enum": [
                    "17"
                  ]
                },
                {
                  "title": "Svenska",
                  "enum": [
                    "18"
                  ]
                },
                {
                  "title": "Italiano",
                  "enum": [
                    "19"
                  ]
                },
                {
                  "title": "Українська",
                  "enum": [
                    "20"
                  ]
                },
                {
                  "title": "Türkçe",
                  "enum": [
                    "21"
                  ]
                },
                {
                  "title": "Ελληνικά",
                  "enum": [
                    "22"
                  ]
                },
                {
                  "title": "Hrvatski",
                  "enum": [
                    "23"
                  ]
                },
                {
                  "title": "Română",
                  "enum": [
                    "24"
                  ]
                },
                {
                  "title": "Slovenščina",
                  "enum": [
                    "25"
                  ]
                }
              ]
            },
            "type": {
              "title": "Account Type",
              "type": "string",
              "default": "disabled",
              "description": "Here select the account type.",
              "anyOf": [
                {
                  "title": "Disabled",
                  "enum": [
                    "disabled"
                  ]
                },
                {
                  "title": "MELCLoud",
                  "enum": [
                    "melcloud"
                  ]
                },
                {
                  "title": "MELCLoud Home",
                  "enum": [
                    "melcloudhome"
                  ]
                }
              ]
            },
            "ataDevices": {
              "title": "ATA Devices",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "title": "Id",
                    "type": "string"
                  },
                  "type": {
                    "title": "Type",
                    "type": "integer"
                  },
                  "displayType": {
                    "title": "Display Type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2,
                    "description": "Select accessory control type displayed in HomeKit.",
                    "anyOf": [
                      {
                        "title": "Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Heater / Cooler",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Thermostat",
                        "enum": [
                          2
                        ]
                      }
                    ]
                  },
                  "name": {
                    "title": "Name",
                    "type": "string",
                    "placeholder": "Air Conditioner Name",
                    "description": "Here set Your own name displayed in HomeKit."
                  },
                  "heatDryFanMode": {
                    "title": "Heat",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3,
                    "description": "Select the operating mode for Heat, work only if mode supported by device.",
                    "anyOf": [
                      {
                        "title": "Heat",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Dry",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Fan",
                        "enum": [
                          3
                        ]
                      }
                    ]
                  },
                  "coolDryFanMode": {
                    "title": "Cool",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3,
                    "description": "Select the operating mode for Cool, work only if mode supported by device.",
                    "anyOf": [
                      {
                        "title": "Cool",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Dry",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Fan",
                        "enum": [
                          3
                        ]
                      }
                    ]
                  },
                  "autoDryFanMode": {
                    "title": "Auto",
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3,
                    "description": "Select the operating mode for Auto, work only if mode supported by device.",
                    "anyOf": [
                      {
                        "title": "Auto",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Dry",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Fan",
                        "enum": [
                          3
                        ]
                      }
                    ]
                  },
                  "temperatureRoomSensor": {
                    "title": "Room",
                    "type": "boolean",
                    "description": "This enable extra room temperature sensor to use with HomeKit automations."
                  },
                  "temperatureOutdoorSensor": {
                    "title": "Outdoor",
                    "type": "boolean",
                    "description": "This enable extra outdoor temperature sensor to use with HomeKit automations."
                  },
                  "inStandbySensor": {
                    "title": "In Standby",
                    "type": "boolean",
                    "description": "This enable in standby mode sensor to use with HomeKit automations."
                  },
                  "connectSensor": {
                    "title": "Connect",
                    "type": "boolean",
                    "description": "This enable connect state sensor to use with HomeKit automations."
                  },
                  "errorSensor": {
                    "title": "Error",
                    "type": "boolean",
                    "description": "This enable error sensor to use with HomeKit automations."
                  },
                  "frostProtectionSupport": {
                    "title": "Frost Protection Support",
                    "type": "boolean",
                    "description": "This enable frost protection control and sensors to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
                    }
                  },
                  "overheatProtectionSupport": {
                    "title": "Overheat Protection Support",
                    "type": "boolean",
                    "description": "This enable overheat protection control and sensors to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
                    }
                  },
                  "holidayModeSupport": {
                    "title": "Holiday Mode Support",
                    "type": "boolean",
                    "description": "This enable holiday mode control and sensors to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
                    }
                  },
                  "remoteRoomTemperatureSupport": {
                    "title": "Remote Room Temperature",
                    "type": "boolean",
                    "description": "This enable support to update room temperature with MQTT or RESTFul."
                  },
                  "presets": {
                    "title": "Presets",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "title": "Id",
                          "type": "string"
                        },
                        "displayType": {
                          "title": "Display Type",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 7,
                          "description": "Select the characteristic type to be displayed in HomeKit.",
                          "anyOf": [
                            {
                              "title": "Disabled",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "Motion Sensor",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "Occupancy Sensor",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "Contact Sensor",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "Switch + Motion Sensor",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "Switch + Occupancy Sensor",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "Switch + Contact Sensor",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "Switch",
                              "enum": [
                                7
                              ]
                            }
                          ]
                        },
                        "name": {
                          "title": "Name",
                          "type": "string",
                          "placeholder": "Preset Name",
                          "description": "Here set Your own name displayed in HomeKit."
                        },
                        "namePrefix": {
                          "title": "Prefix",
                          "type": "boolean",
                          "description": "Enable the accessory name as a prefix for preset name.",
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].ataDevices[arrayIndices[1]].presets[arrayIndices[2]].displayType > 0;"
                          }
                        }
                      }
                    }
                  },
                  "schedules": {
                    "title": "Schedules",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "title": "Id",
                          "type": "string"
                        },
                        "displayType": {
                          "title": "Display Type",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 7,
                          "description": "Select the characteristic type to be displayed in HomeKit.",
                          "anyOf": [
                            {
                              "title": "Disabled",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "Motion Sensor",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "Occupancy Sensor",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "Contact Sensor",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "Switch + Motion Sensor",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "Switch + Occupancy Sensor",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "Switch + Contact Sensor",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "Switch",
                              "enum": [
                                7
                              ]
                            }
                          ]
                        },
                        "name": {
                          "title": "Name",
                          "type": "string",
                          "placeholder": "Schedule Name",
                          "description": "Here set Your own name displayed in HomeKit."
                        },
                        "namePrefix": {
                          "title": "Prefix",
                          "type": "boolean",
                          "description": "Enable the accessory name as a prefix for schedule name.",
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].ataDevices[arrayIndices[1]].schedules[arrayIndices[2]].displayType > 0;"
                          }
                        }
                      }
                    }
                  },
                  "scenes": {
                    "title": "Scenes",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "title": "Id",
                          "type": "string"
                        },
                        "displayType": {
                          "title": "Display Type",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 7,
                          "description": "Select the characteristic type to be displayed in HomeKit.",
                          "anyOf": [
                            {
                              "title": "Disabled",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "Motion Sensor",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "Occupancy Sensor",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "Contact Sensor",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "Switch + Motion Sensor",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "Switch + Occupancy Sensor",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "Switch + Contact Sensor",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "Switch",
                              "enum": [
                                7
                              ]
                            }
                          ]
                        },
                        "name": {
                          "title": "Name",
                          "type": "string",
                          "placeholder": "Scene Name",
                          "description": "Here set Your own name displayed in HomeKit."
                        },
                        "namePrefix": {
                          "title": "Prefix",
                          "type": "boolean",
                          "description": "Enable the accessory name as a prefix for scene name.",
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].ataDevices[arrayIndices[1]].scenes[arrayIndices[2]].displayType > 0;"
                          }
                        }
                      }
                    }
                  },
                  "buttonsSensors": {
                    "title": "Button / Sensor",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "displayType": {
                          "title": "Display Type",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 7,
                          "description": "Select the characteristic type to be displayed in HomeKit.",
                          "anyOf": [
                            {
                              "title": "Disabled",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "Motion Sensor",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "Occupancy Sensor",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "Contact Sensor",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "Switch + Motion Sensor",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "Switch + Occupancy Sensor",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "Switch + Contact Sensor",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "Switch",
                              "enum": [
                                7
                              ]
                            }
                          ]
                        },
                        "name": {
                          "title": "Name",
                          "type": "string",
                          "placeholder": "Function Name",
                          "description": "Here set Your own name displayed in HomeKit."
                        },
                        "mode": {
                          "title": "Mode",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 40,
                          "description": "Function, VH - Vane Horizontal, VV - Vane Vertical.",
                          "anyOf": [
                            {
                              "title": "POWER ON / OFF",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "MODE HEAT",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "MODE DRY",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "MODE COOL",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "MODE FAN",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "MODE AUTO",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "MODE PURIFY",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "VH MODE AUTO",
                              "enum": [
                                10
                              ]
                            },
                            {
                              "title": "VH MODE 1 / LEFT",
                              "enum": [
                                11
                              ]
                            },
                            {
                              "title": "VH MODE 2",
                              "enum": [
                                12
                              ]
                            },
                            {
                              "title": "VH MODE 3 / CENTER",
                              "enum": [
                                13
                              ]
                            },
                            {
                              "title": "VH MODE 4",
                              "enum": [
                                14
                              ]
                            },
                            {
                              "title": "VH MODE 5 / RIGHT",
                              "enum": [
                                15
                              ]
                            },
                            {
                              "title": "VH MODE SPLIT",
                              "enum": [
                                16
                              ]
                            },
                            {
                              "title": "VH MODE SWING",
                              "enum": [
                                17
                              ]
                            },
                            {
                              "title": "VV MODE AUTO",
                              "enum": [
                                20
                              ]
                            },
                            {
                              "title": "VV MODE 1 / UP",
                              "enum": [
                                21
                              ]
                            },
                            {
                              "title": "VV MODE 2",
                              "enum": [
                                22
                              ]
                            },
                            {
                              "title": "VV MODE 3 / CENTER",
                              "enum": [
                                23
                              ]
                            },
                            {
                              "title": "VV MODE 4",
                              "enum": [
                                24
                              ]
                            },
                            {
                              "title": "VV MODE 5 / DOWN",
                              "enum": [
                                25
                              ]
                            },
                            {
                              "title": "VV SWING",
                              "enum": [
                                26
                              ]
                            },
                            {
                              "title": "FAN MODE AUTO",
                              "enum": [
                                30
                              ]
                            },
                            {
                              "title": "FAN MODE 1",
                              "enum": [
                                31
                              ]
                            },
                            {
                              "title": "FAN MODE 2",
                              "enum": [
                                32
                              ]
                            },
                            {
                              "title": "FAN MODE 3",
                              "enum": [
                                33
                              ]
                            },
                            {
                              "title": "FAN MODE 4",
                              "enum": [
                                34
                              ]
                            },
                            {
                              "title": "FAN MODE 5",
                              "enum": [
                                35
                              ]
                            },
                            {
                              "title": "FAN MODE 6",
                              "enum": [
                                36
                              ]
                            },
                            {
                              "title": "LOCK CONTROL All (Only MELCloud)",
                              "enum": [
                                37
                              ]
                            },
                            {
                              "title": "LOCK CONTROL POWER (Only MELCloud)",
                              "enum": [
                                38
                              ]
                            },
                            {
                              "title": "LOCK CONTROL MODE (Only MELCloud)",
                              "enum": [
                                39
                              ]
                            },
                            {
                              "title": "LOCK CONTROL TEMPERATURE (Only MELCloud)",
                              "enum": [
                                40
                              ]
                            }
                          ],
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].ataDevices[arrayIndices[1]].buttonsSensors[arrayIndices[2]].displayType > 0;"
                          }
                        },
                        "namePrefix": {
                          "title": "Prefix",
                          "type": "boolean",
                          "description": "Enable the accessory name as a prefix for button / sensor name.",
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].ataDevices[arrayIndices[1]].buttonsSensors[arrayIndices[2]].displayType > 0;"
                          }
                        }
                      },
                      "allOf": [
                        {
                          "if": {
                            "required": [
                              "displayType"
                            ],
                            "properties": {
                              "displayType": {
                                "enum": [
                                  1,
                                  2,
                                  3,
                                  4,
                                  5,
                                  6,
                                  7
                                ]
                              }
                            }
                          },
                          "then": {
                            "required": [
                              "mode"
                            ]
                          }
                        }
                      ]
                    }
                  }
                }
              }
            },
            "atwDevices": {
              "title": "ATW Devices",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "title": "Id",
                    "type": "string"
                  },
                  "type": {
                    "title": "Type",
                    "type": "integer"
                  },
                  "name": {
                    "title": "Name",
                    "type": "string",
                    "placeholder": "Heat Pump Name",
                    "description": "Here set Your own name displayed in HomeKit."
                  },
                  "displayType": {
                    "title": "Display Type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2,
                    "description": "Select accessory control type displayed in HomeKit.",
                    "anyOf": [
                      {
                        "title": "Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Heater / Cooler",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Thermostat",
                        "enum": [
                          2
                        ]
                      }
                    ]
                  },
                  "hideZone": {
                    "title": "Hide zone",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 15,
                    "description": "Select zone to hidde in HomeKit, if present.",
                    "anyOf": [
                      {
                        "title": "Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Heat Pump",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Heat Pump / Zone 1",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Heat Pump / Zone 1 / Hot Water",
                        "enum": [
                          3
                        ]
                      },
                      {
                        "title": "Heat Pump / Zone 1 / Zone 2",
                        "enum": [
                          4
                        ]
                      },
                      {
                        "title": "Heat Pump / Hot Water",
                        "enum": [
                          5
                        ]
                      },
                      {
                        "title": "Heat Pump / Hot Water / Zone 2",
                        "enum": [
                          6
                        ]
                      },
                      {
                        "title": "Heat Pump / Zone 2",
                        "enum": [
                          7
                        ]
                      },
                      {
                        "title": "Zone 1",
                        "enum": [
                          8
                        ]
                      },
                      {
                        "title": "Zone 1 / Hot Water",
                        "enum": [
                          9
                        ]
                      },
                      {
                        "title": "Zone 1 / Hot Water / Zone 2",
                        "enum": [
                          10
                        ]
                      },
                      {
                        "title": "Zone 1 / Zone 2",
                        "enum": [
                          11
                        ]
                      },
                      {
                        "title": "Hot Water",
                        "enum": [
                          12
                        ]
                      },
                      {
                        "title": "Hot Water / Zone 2",
                        "enum": [
                          13
                        ]
                      },
                      {
                        "title": "Zone 2",
                        "enum": [
                          14
                        ]
                      },
                      {
                        "title": "All",
                        "enum": [
                          15
                        ]
                      }
                    ],
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].atwDevices[arrayIndices[1]].displayType > 0;"
                    }
                  },
                  "temperatureOutdoorSensor": {
                    "title": "Temperature Sensor Outdoor",
                    "type": "boolean",
                    "description": "This enable extra Outdoor temperature sensor to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                    }
                  },
                  "temperatureRoomSensor": {
                    "title": "Temperature Room",
                    "type": "boolean",
                    "description": "This enable extra Room temperature sensor to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                    }
                  },
                  "temperatureFlowSensor": {
                    "title": "Temperature Sensor Flow",
                    "type": "boolean",
                    "description": "This enable extra Flow temperature sensor to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                    }
                  },
                  "temperatureReturnSensor": {
                    "title": "Temperature Sensor Return",
                    "type": "boolean",
                    "description": "This enable extra Return temperature sensor to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                    }
                  },
                  "temperatureRoomZone1Sensor": {
                    "title": "Temperature Sensor Room Zone 1",
                    "type": "boolean",
                    "description": "This enable extra Room Zone 1 temperature sensor to use with HomeKit automations."
                  },
                  "temperatureFlowZone1Sensor": {
                    "title": "Temperature Sensor Flow Zone 1",
                    "type": "boolean",
                    "description": "This enable extra Flow Zone 1 temperature sensor to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                    }
                  },
                  "temperatureReturnZone1Sensor": {
                    "title": "Temperature Sensor Return Zone 1",
                    "type": "boolean",
                    "description": "This enable extra Return Zone 1 temperature sensor to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                    }
                  },
                  "temperatureWaterTankSensor": {
                    "title": "Temperature Sensor Water Tank",
                    "type": "boolean",
                    "description": "This enable extra Water Tank temperature sensor to use with HomeKit automations."
                  },
                  "temperatureFlowWaterTankSensor": {
                    "title": "Temperature Sensor Flow Water Tank",
                    "type": "boolean",
                    "description": "This enable extra Flow Water Tank temperature sensor to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                    }
                  },
                  "temperatureReturnWaterTankSensor": {
                    "title": "Temperature Sensor Return Water Tank",
                    "type": "boolean",
                    "description": "This enable extra Return Water Tank temperature sensor to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                    }
                  },
                  "temperatureRoomZone2Sensor": {
                    "title": "Temperature Sensor Room Zone 2",
                    "type": "boolean",
                    "description": "This enable extra Room Zone 2 temperature sensor to use with HomeKit automations."
                  },
                  "temperatureFlowZone2Sensor": {
                    "title": "Temperature Sensor Flow Zone 2",
                    "type": "boolean",
                    "description": "This enable extra Flow Zone 2 temperature sensor to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                    }
                  },
                  "temperatureReturnZone2Sensor": {
                    "title": "Temperature Sensor Return Zone 2",
                    "type": "boolean",
                    "description": "This enable extra Return Zone 2 temperature sensor to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                    }
                  },
                  "inStandbySensor": {
                    "title": "In Standby",
                    "type": "boolean",
                    "description": "This enable in standby mode sensor to use with HomeKit automations."
                  },
                  "connectSensor": {
                    "title": "Connect",
                    "type": "boolean",
                    "description": "This enable connect state sensor to use with HomeKit automations."
                  },
                  "errorSensor": {
                    "title": "Error",
                    "type": "boolean",
                    "description": "This enable error sensor to use with HomeKit automations."
                  },
                  "frostProtectionSupport": {
                    "title": "Frost Protection Support",
                    "type": "boolean",
                    "description": "This enable frost protection control and sensors to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
                    }
                  },
                  "holidayModeSupport": {
                    "title": "Holiday Mode Support",
                    "type": "boolean",
                    "description": "This enable holiday mode control and sensors to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
                    }
                  },
                  "presets": {
                    "title": "Presets",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "title": "Id",
                          "type": "string"
                        },
                        "displayType": {
                          "title": "Display Type",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 7,
                          "description": "Select the characteristic type to be displayed in HomeKit.",
                          "anyOf": [
                            {
                              "title": "Disabled",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "Motion Sensor",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "Occupancy Sensor",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "Contact Sensor",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "Switch + Motion Sensor",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "Switch + Occupancy Sensor",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "Switch + Contact Sensor",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "Switch",
                              "enum": [
                                7
                              ]
                            }
                          ]
                        },
                        "name": {
                          "title": "Name",
                          "type": "string",
                          "placeholder": "Preset Name",
                          "description": "Here set Your own name displayed in HomeKit."
                        },
                        "namePrefix": {
                          "title": "Prefix",
                          "type": "boolean",
                          "description": "Enable the accessory name as a prefix for preset name.",
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].atwDevices[arrayIndices[1]].schedules[arrayIndices[2]].displayType > 0;"
                          }
                        }
                      }
                    }
                  },
                  "schedules": {
                    "title": "Schedules",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "title": "Id",
                          "type": "string"
                        },
                        "displayType": {
                          "title": "Display Type",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 7,
                          "description": "Select the characteristic type to be displayed in HomeKit.",
                          "anyOf": [
                            {
                              "title": "Disabled",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "Motion Sensor",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "Occupancy Sensor",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "Contact Sensor",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "Switch + Motion Sensor",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "Switch + Occupancy Sensor",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "Switch + Contact Sensor",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "Switch",
                              "enum": [
                                7
                              ]
                            }
                          ]
                        },
                        "name": {
                          "title": "Name",
                          "type": "string",
                          "placeholder": "Schedule Name",
                          "description": "Here set Your own name displayed in HomeKit."
                        },
                        "namePrefix": {
                          "title": "Prefix",
                          "type": "boolean",
                          "description": "Enable the accessory name as a prefix for schedule name.",
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].atwDevices[arrayIndices[1]].schedules[arrayIndices[2]].displayType > 0;"
                          }
                        }
                      }
                    }
                  },
                  "scenes": {
                    "title": "Scenes",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "title": "Id",
                          "type": "string"
                        },
                        "displayType": {
                          "title": "Display Type",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 7,
                          "description": "Select the characteristic type to be displayed in HomeKit.",
                          "anyOf": [
                            {
                              "title": "Disabled",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "Motion Sensor",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "Occupancy Sensor",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "Contact Sensor",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "Switch + Motion Sensor",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "Switch + Occupancy Sensor",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "Switch + Contact Sensor",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "Switch",
                              "enum": [
                                7
                              ]
                            }
                          ]
                        },
                        "name": {
                          "title": "Name",
                          "type": "string",
                          "placeholder": "Scene Name",
                          "description": "Here set Your own name displayed in HomeKit."
                        },
                        "namePrefix": {
                          "title": "Prefix",
                          "type": "boolean",
                          "description": "Enable the accessory name as a prefix for scene name.",
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].atwDevices[arrayIndices[1]].scenes[arrayIndices[2]].displayType > 0;"
                          }
                        }
                      }
                    }
                  },
                  "buttonsSensors": {
                    "title": "Button / Sensor",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "displayType": {
                          "title": "Display Type",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 7,
                          "description": "Select the characteristic type to be displayed in HomeKit.",
                          "anyOf": [
                            {
                              "title": "Disabled",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "Motion Sensor",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "Occupancy Sensor",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "Contact Sensor",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "Switch + Motion Sensor",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "Switch + Occupancy Sensor",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "Switch + Contact Sensor",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "Switch",
                              "enum": [
                                7
                              ]
                            }
                          ]
                        },
                        "name": {
                          "title": "Name",
                          "type": "string",
                          "placeholder": "Function Name",
                          "description": "Here set Your own name displayed in HomeKit."
                        },
                        "mode": {
                          "title": "Mode",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 70,
                          "description": "Select the function.",
                          "anyOf": [
                            {
                              "title": "POWER ON / OFF",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "MODE HEAT",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "MODE COOL",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "MODE HOLIDAY",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "LOCK CONTROL ALL (Only MELCloud)",
                              "enum": [
                                10
                              ]
                            },
                            {
                              "title": "Z1 MODE HEAT ROOM",
                              "enum": [
                                20
                              ]
                            },
                            {
                              "title": "Z1 MODE HEAT FLOW",
                              "enum": [
                                21
                              ]
                            },
                            {
                              "title": "Z1 MODE HEAT CURVE",
                              "enum": [
                                22
                              ]
                            },
                            {
                              "title": "Z1 MODE COOL ROOM",
                              "enum": [
                                23
                              ]
                            },
                            {
                              "title": "Z1 MODE COOL FLOW",
                              "enum": [
                                24
                              ]
                            },
                            {
                              "title": "Z1 MODE FLOOR DRY UP",
                              "enum": [
                                25
                              ]
                            },
                            {
                              "title": "Z1 LOCK CONTROL (Only MELCloud)",
                              "enum": [
                                30
                              ]
                            },
                            {
                              "title": "HW MODE FORCE",
                              "enum": [
                                40
                              ]
                            },
                            {
                              "title": "HW MODE ECO (Only MELCloud)",
                              "enum": [
                                41
                              ]
                            },
                            {
                              "title": "HW LOCK CONTROL",
                              "enum": [
                                50
                              ]
                            },
                            {
                              "title": "Z2 MODE HEAT ROOM",
                              "enum": [
                                60
                              ]
                            },
                            {
                              "title": "Z2 MODE HEAT FLOW",
                              "enum": [
                                61
                              ]
                            },
                            {
                              "title": "Z2 MODE HEAT CURVE",
                              "enum": [
                                62
                              ]
                            },
                            {
                              "title": "Z2 MODE COOL ROOM",
                              "enum": [
                                63
                              ]
                            },
                            {
                              "title": "Z2 MODE COOL FLOW",
                              "enum": [
                                64
                              ]
                            },
                            {
                              "title": "Z2 MODE FLOOR DRY UP",
                              "enum": [
                                65
                              ]
                            },
                            {
                              "title": "Z2 LOCK CONTROL (Only MELCloud)",
                              "enum": [
                                70
                              ]
                            }
                          ],
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].atwDevices[arrayIndices[1]].buttonsSensors[arrayIndices[2]].displayType > 0;"
                          }
                        },
                        "namePrefix": {
                          "title": "Prefix",
                          "type": "boolean",
                          "description": "Enable the accessory name as a prefix for button / sensor name.",
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].atwDevices[arrayIndices[1]].buttonsSensors[arrayIndices[2]].displayType > 0;"
                          }
                        }
                      },
                      "allOf": [
                        {
                          "if": {
                            "required": [
                              "displayType"
                            ],
                            "properties": {
                              "displayType": {
                                "enum": [
                                  1,
                                  2,
                                  3,
                                  4,
                                  5,
                                  6,
                                  7
                                ]
                              }
                            }
                          },
                          "then": {
                            "required": [
                              "mode"
                            ]
                          }
                        }
                      ]
                    }
                  }
                }
              }
            },
            "ervDevices": {
              "title": "ERV Devices",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "title": "Id",
                    "type": "string"
                  },
                  "type": {
                    "title": "Type",
                    "type": "integer"
                  },
                  "name": {
                    "title": "Name",
                    "type": "string",
                    "placeholder": "Ventilation Name",
                    "description": "Here set Your own name displayed in HomeKit."
                  },
                  "displayType": {
                    "title": "Display Type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2,
                    "description": "Select accessory control type displayed in HomeKit.",
                    "anyOf": [
                      {
                        "title": "Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Heater / Cooler",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Thermostat",
                        "enum": [
                          2
                        ]
                      }
                    ]
                  },
                  "temperatureRoomSensor": {
                    "title": "Temperature Sensor Room",
                    "type": "boolean",
                    "description": "This enable extra temperature sensor to use with HomeKit automations."
                  },
                  "temperatureOutdoorSensor": {
                    "title": "Temperature Sensor Outdoor",
                    "type": "boolean",
                    "description": "This enable extra outdoor temperature sensor to use with HomeKit automations."
                  },
                  "temperatureSensorSupply": {
                    "title": "Temperature Sensor Supply",
                    "type": "boolean",
                    "description": "This enable extra supply temperature sensor to use with HomeKit automations."
                  },
                  "inStandbySensor": {
                    "title": "In Standby",
                    "type": "boolean",
                    "description": "This enable in standby mode sensor to use with HomeKit automations."
                  },
                  "connectSensor": {
                    "title": "Connect",
                    "type": "boolean",
                    "description": "This enable connect state sensor to use with HomeKit automations."
                  },
                  "errorSensor": {
                    "title": "Error",
                    "type": "boolean",
                    "description": "This enable error sensor to use with HomeKit automations."
                  },
                  "holidayModeSupport": {
                    "title": "Holiday Mode Support",
                    "type": "boolean",
                    "description": "This enable holiday mode control and sensors to use with HomeKit automations.",
                    "condition": {
                      "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
                    }
                  },
                  "presets": {
                    "title": "Presets",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "title": "Id",
                          "type": "string"
                        },
                        "displayType": {
                          "title": "Display Type",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 7,
                          "description": "Select the characteristic type to be displayed in HomeKit.",
                          "anyOf": [
                            {
                              "title": "Disabled",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "Motion Sensor",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "Occupancy Sensor",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "Contact Sensor",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "Switch + Motion Sensor",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "Switch + Occupancy Sensor",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "Switch + Contact Sensor",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "Switch",
                              "enum": [
                                7
                              ]
                            }
                          ]
                        },
                        "name": {
                          "title": "Name",
                          "type": "string",
                          "placeholder": "Preset Name",
                          "description": "Here set Your own name displayed in Homebridge / Homebridge / HomeKit app."
                        },
                        "namePrefix": {
                          "title": "Prefix",
                          "type": "boolean",
                          "description": "Enable the accessory name as a prefix for preset name.",
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].ervDevices[arrayIndices[1]].presets[arrayIndices[2]].displayType > 0;"
                          }
                        }
                      }
                    }
                  },
                  "schedules": {
                    "title": "Schedules",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "title": "Id",
                          "type": "string"
                        },
                        "displayType": {
                          "title": "Display Type",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 7,
                          "description": "Select the characteristic type to be displayed in HomeKit.",
                          "anyOf": [
                            {
                              "title": "Disabled",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "Motion Sensor",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "Occupancy Sensor",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "Contact Sensor",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "Switch + Motion Sensor",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "Switch + Occupancy Sensor",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "Switch + Contact Sensor",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "Switch",
                              "enum": [
                                7
                              ]
                            }
                          ]
                        },
                        "name": {
                          "title": "Name",
                          "type": "string",
                          "placeholder": "Schedule Name",
                          "description": "Here set Your own name displayed in HomeKit."
                        },
                        "namePrefix": {
                          "title": "Prefix",
                          "type": "boolean",
                          "description": "Enable the accessory name as a prefix for schedule name.",
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].ervDevices[arrayIndices[1]].schedules[arrayIndices[2]].displayType > 0;"
                          }
                        }
                      }
                    }
                  },
                  "scenes": {
                    "title": "Scenes",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "title": "Id",
                          "type": "string"
                        },
                        "displayType": {
                          "title": "Display Type",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 7,
                          "description": "Select the characteristic type to be displayed in HomeKit.",
                          "anyOf": [
                            {
                              "title": "Disabled",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "Motion Sensor",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "Occupancy Sensor",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "Contact Sensor",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "Switch + Motion Sensor",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "Switch + Occupancy Sensor",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "Switch + Contact Sensor",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "Switch",
                              "enum": [
                                7
                              ]
                            }
                          ]
                        },
                        "name": {
                          "title": "Name",
                          "type": "string",
                          "placeholder": "Scene Name",
                          "description": "Here set Your own name displayed in HomeKit."
                        },
                        "namePrefix": {
                          "title": "Prefix",
                          "type": "boolean",
                          "description": "Enable the accessory name as a prefix for scene name.",
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].ervDevices[arrayIndices[1]].scenes[arrayIndices[2]].displayType > 0;"
                          }
                        }
                      }
                    }
                  },
                  "buttonsSensors": {
                    "title": "Buttons",
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "displayType": {
                          "title": "Display Type",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 7,
                          "description": "Select the characteristic type to be displayed in HomeKit.",
                          "anyOf": [
                            {
                              "title": "Disabled",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "Motion Sensor",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "Occupancy Sensor",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "Contact Sensor",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "Switch + Motion Sensor",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "Switch + Occupancy Sensor",
                              "enum": [
                                5
                              ]
                            },
                            {
                              "title": "Switch + Contact Sensor",
                              "enum": [
                                6
                              ]
                            },
                            {
                              "title": "Switch",
                              "enum": [
                                7
                              ]
                            }
                          ]
                        },
                        "name": {
                          "title": "Name",
                          "type": "string",
                          "placeholder": "Function Name",
                          "description": "Here set Your own name displayed in HomeKit."
                        },
                        "mode": {
                          "title": "Mode",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 18,
                          "description": "Select the function.",
                          "anyOf": [
                            {
                              "title": "POWER ON / OFF",
                              "enum": [
                                0
                              ]
                            },
                            {
                              "title": "MODE LOSSNAY",
                              "enum": [
                                1
                              ]
                            },
                            {
                              "title": "MODE BYPASS",
                              "enum": [
                                2
                              ]
                            },
                            {
                              "title": "MODE AUTO",
                              "enum": [
                                3
                              ]
                            },
                            {
                              "title": "MODE NIGHT PURGE",
                              "enum": [
                                4
                              ]
                            },
                            {
                              "title": "FAN MODE AUTO",
                              "enum": [
                                10
                              ]
                            },
                            {
                              "title": "FAN MODE 1",
                              "enum": [
                                11
                              ]
                            },
                            {
                              "title": "FAN MODE 2",
                              "enum": [
                                12
                              ]
                            },
                            {
                              "title": "FAN MODE 3",
                              "enum": [
                                13
                              ]
                            },
                            {
                              "title": "FAN MODE 4",
                              "enum": [
                                14
                              ]
                            },
                            {
                              "title": "LOCK CONTROL",
                              "enum": [
                                15
                              ]
                            }
                          ],
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].ervDevices[arrayIndices[1]].buttonsSensors[arrayIndices[2]].displayType > 0;"
                          }
                        },
                        "namePrefix": {
                          "title": "Prefix",
                          "type": "boolean",
                          "description": "Enable the accessory name as a prefix for button / sensor name.",
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].ervDevices[arrayIndices[1]].buttonsSensors[arrayIndices[2]].displayType > 0;"
                          }
                        }
                      },
                      "allOf": [
                        {
                          "if": {
                            "required": [
                              "displayType"
                            ],
                            "properties": {
                              "displayType": {
                                "enum": [
                                  1,
                                  2,
                                  3,
                                  4,
                                  5,
                                  6,
                                  7
                                ]
                              }
                            }
                          },
                          "then": {
                            "required": [
                              "mode"
                            ]
                          }
                        }
                      ]
                    }
                  }
                }
              }
            },
            "refreshInterval": {
              "title": "Refresh Interval",
              "type": "integer",
              "default": 120,
              "minimum": 1,
              "maximum": 600,
              "description": "Set the background account data refresh time in seconds.",
              "condition": {
                "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
              }
            },
            "log": {
              "title": "Log",
              "type": "object",
              "properties": {
                "deviceInfo": {
                  "title": "Device Info",
                  "type": "boolean",
                  "default": true,
                  "description": "This enable log level device info, will display overall device info by every plugin restart"
                },
                "success": {
                  "title": "Success",
                  "type": "boolean",
                  "default": true,
                  "description": "This enable log level success"
                },
                "info": {
                  "title": "Info",
                  "type": "boolean",
                  "default": false,
                  "description": "This enable log level info"
                },
                "warn": {
                  "title": "Warn",
                  "type": "boolean",
                  "default": true,
                  "description": "This enable log level warn"
                },
                "error": {
                  "title": "Error",
                  "type": "boolean",
                  "default": true,
                  "description": "This enable log level error"
                },
                "debug": {
                  "title": "Debug",
                  "type": "boolean",
                  "default": false,
                  "description": "This enable log level debug"
                }
              }
            },
            "restFul": {
              "title": "RESTFul",
              "type": "object",
              "properties": {
                "enable": {
                  "title": "Enable",
                  "type": "boolean",
                  "default": false,
                  "description": "This enable RESTful server."
                }
              }
            },
            "mqtt": {
              "title": "MQTT",
              "type": "object",
              "properties": {
                "enable": {
                  "title": "Enable",
                  "type": "boolean",
                  "default": false,
                  "description": "This enable MQTT client."
                },
                "host": {
                  "title": "IP/Hostname",
                  "type": "string",
                  "placeholder": "192.168.1.20 or mqtt.local",
                  "pattern": "^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)(\\.([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?))*)$",
                  "description": "Here set the IP/Hostname of MQTT Broker.",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
                  }
                },
                "port": {
                  "title": "Port",
                  "type": "integer",
                  "placeholder": 1883,
                  "description": "Here set the port of MQTT Broker.",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
                  }
                },
                "clientId": {
                  "title": "Client ID",
                  "type": "string",
                  "placeholder": "client id",
                  "description": "Here optional set the Client ID of MQTT Broker.",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true"
                  }
                },
                "prefix": {
                  "title": "Prefix",
                  "type": "string",
                  "placeholder": "home",
                  "description": "Here set the prefix.",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
                  }
                },
                "auth": {
                  "title": "Authorization",
                  "type": "object",
                  "properties": {
                    "enable": {
                      "title": "Enable",
                      "type": "boolean",
                      "description": "This enable authorization for MQTT Broker."
                    },
                    "user": {
                      "title": "User",
                      "type": "string",
                      "placeholder": "user",
                      "description": "Here set the user of MQTT Broker.",
                      "condition": {
                        "functionBody": "return model.devices[arrayIndices].mqtt.auth.enable === true;"
                      }
                    },
                    "passwd": {
                      "title": "Password",
                      "type": "string",
                      "placeholder": "password",
                      "description": "Here set the password of MQTT Broker.",
                      "format": "password",
                      "condition": {
                        "functionBody": "return model.devices[arrayIndices].mqtt.auth.enable === true;"
                      }
                    }
                  },
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
                  },
                  "allOf": [
                    {
                      "if": {
                        "required": [
                          "enable"
                        ],
                        "properties": {
                          "enable": {
                            "const": true
                          }
                        }
                      },
                      "then": {
                        "required": [
                          "user",
                          "passwd"
                        ]
                      }
                    }
                  ]
                }
              },
              "allOf": [
                {
                  "if": {
                    "required": [
                      "enable"
                    ],
                    "properties": {
                      "enable": {
                        "const": true
                      }
                    }
                  },
                  "then": {
                    "required": [
                      "host"
                    ]
                  }
                }
              ]
            }
          },
          "required": [
            "name",
            "user",
            "passwd",
            "language",
            "type"
          ]
        }
      }
    }
  },
  "layout": [
    {
      "key": "accounts",
      "type": "tabarray",
      "title": "{{ value.name || 'account' }}",
      "items": [
        "accounts[].name",
        "accounts[].user",
        {
          "key": "accounts[].passwd",
          "type": "password"
        },
        "accounts[].language",
        "accounts[].type",
        {
          "key": "accounts[]",
          "type": "tabarray",
          "title": "{{ value.title }}",
          "items": [
            {
              "title": "Air Conditioner",
              "items": [
                {
                  "key": "accounts[].ataDevices",
                  "type": "tabarray",
                  "title": "{{ value.name || 'Air Conditioner' }}",
                  "items": [
                    {
                      "key": "accounts[].ataDevices[]",
                      "items": [
                        {
                          "key": "accounts[].ataDevices[].id",
                          "readonly": true
                        },
                        "accounts[].ataDevices[].displayType",
                        {
                          "title": "Settings",
                          "type": "section",
                          "description": "Section for setup device settings",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            "accounts[].ataDevices[].name",
                            "accounts[].ataDevices[].heatDryFanMode",
                            "accounts[].ataDevices[].coolDryFanMode",
                            "accounts[].ataDevices[].autoDryFanMode"
                          ]
                        },
                        {
                          "title": "Presets",
                          "type": "section",
                          "description": "Section for setup device presets",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            {
                              "key": "accounts[].ataDevices[].presets",
                              "type": "tabarray",
                              "title": "{{ value.name || 'Preset' }}",
                              "items": [
                                {
                                  "key": "accounts[].ataDevices[].presets[].id",
                                  "readonly": true
                                },
                                "accounts[].ataDevices[].presets[].displayType",
                                "accounts[].ataDevices[].presets[].name",
                                "accounts[].ataDevices[].presets[].namePrefix"
                              ]
                            }
                          ],
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                          }
                        },
                        {
                          "title": "Scenes",
                          "type": "section",
                          "description": "Section for setup device scenes",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            {
                              "key": "accounts[].ataDevices[].scenes",
                              "type": "tabarray",
                              "title": "{{ value.name || 'Scene' }}",
                              "items": [
                                {
                                  "key": "accounts[].ataDevices[].scenes[].id",
                                  "readonly": true
                                },
                                "accounts[].ataDevices[].scenes[].displayType",
                                "accounts[].ataDevices[].scenes[].name",
                                "accounts[].ataDevices[].scenes[].namePrefix"
                              ]
                            }
                          ],
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
                          }
                        },
                        {
                          "title": "Schedules",
                          "type": "section",
                          "description": "Section for setup device schedules",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            {
                              "key": "accounts[].ataDevices[].schedules",
                              "type": "tabarray",
                              "title": "{{ value.name || 'Schedule' }}",
                              "items": [
                                {
                                  "key": "accounts[].ataDevices[].schedules[].id",
                                  "readonly": true
                                },
                                "accounts[].ataDevices[].schedules[].displayType",
                                "accounts[].ataDevices[].schedules[].name",
                                "accounts[].ataDevices[].schedules[].namePrefix"
                              ]
                            }
                          ],
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
                          }
                        },
                        {
                          "title": "Monitoring And Control",
                          "type": "section",
                          "description": "Section for setup additional monitoring and control functions.",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            {
                              "key": "accounts[].ataDevices[]",
                              "type": "tabarray",
                              "title": "{{ value.title }}",
                              "items": [
                                {
                                  "title": "Sensors",
                                  "items": [
                                    "accounts[].ataDevices[].temperatureOutdoorSensor",
                                    "accounts[].ataDevices[].temperatureRoomSensor",
                                    "accounts[].ataDevices[].inStandbySensor",
                                    "accounts[].ataDevices[].connectSensor",
                                    "accounts[].ataDevices[].errorSensor"
                                  ]
                                },
                                {
                                  "title": "Functions",
                                  "items": [
                                    "accounts[].ataDevices[].frostProtectionSupport",
                                    "accounts[].ataDevices[].overheatProtectionSupport",
                                    "accounts[].ataDevices[].holidayModeSupport",
                                    "accounts[].ataDevices[].remoteRoomTemperatureSupport"
                                  ]
                                },
                                {
                                  "title": "Custom Functions",
                                  "items": [
                                    {
                                      "key": "accounts[].ataDevices[].buttonsSensors",
                                      "type": "tabarray",
                                      "title": "{{ value.name || 'Function' }}",
                                      "items": [
                                        "accounts[].ataDevices[].buttonsSensors[].displayType",
                                        "accounts[].ataDevices[].buttonsSensors[].mode",
                                        "accounts[].ataDevices[].buttonsSensors[].name",
                                        "accounts[].ataDevices[].buttonsSensors[].namePrefix"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "title": "Heat Pump",
              "items": [
                {
                  "key": "accounts[].atwDevices",
                  "type": "tabarray",
                  "title": "{{ value.name || 'Heat Pump' }}",
                  "items": [
                    {
                      "key": "accounts[].atwDevices[]",
                      "items": [
                        {
                          "key": "accounts[].atwDevices[].id",
                          "readonly": true
                        },
                        "accounts[].atwDevices[].displayType",
                        {
                          "type": "section",
                          "title": "Settings",
                          "description": "Section for setup device settings",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            "accounts[].atwDevices[].hideZone",
                            "accounts[].atwDevices[].name"
                          ]
                        },
                        {
                          "title": "Presets",
                          "type": "section",
                          "description": "Section for setup device presets",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            {
                              "key": "accounts[].atwDevices[].presets",
                              "type": "tabarray",
                              "title": "{{ value.name || 'Preset' }}",
                              "items": [
                                {
                                  "key": "accounts[].atwDevices[].presets[].id",
                                  "readonly": true
                                },
                                "accounts[].atwDevices[].presets[].displayType",
                                "accounts[].atwDevices[].presets[].name",
                                "accounts[].atwDevices[].presets[].namePrefix"
                              ]
                            }
                          ],
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                          }
                        },
                        {
                          "title": "Scenes",
                          "type": "section",
                          "description": "Section for setup device scenes",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            {
                              "key": "accounts[].atwDevices[].scenes",
                              "type": "tabarray",
                              "title": "{{ value.name || 'Scene' }}",
                              "items": [
                                {
                                  "key": "accounts[].atwDevices[].scenes[].id",
                                  "readonly": true
                                },
                                "accounts[].atwDevices[].scenes[].displayType",
                                "accounts[].atwDevices[].scenes[].name",
                                "accounts[].atwDevices[].scenes[].namePrefix"
                              ]
                            }
                          ],
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
                          }
                        },
                        {
                          "title": "Schedules",
                          "type": "section",
                          "description": "Section for setup device schedules",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            {
                              "key": "accounts[].atwDevices[].schedules",
                              "type": "tabarray",
                              "title": "{{ value.name || 'Schedule' }}",
                              "items": [
                                {
                                  "key": "accounts[].atwDevices[].schedules[].id",
                                  "readonly": true
                                },
                                "accounts[].atwDevices[].schedules[].displayType",
                                "accounts[].atwDevices[].schedules[].name",
                                "accounts[].atwDevices[].schedules[].namePrefix"
                              ]
                            }
                          ],
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
                          }
                        },
                        {
                          "title": "Monitoring And Control",
                          "type": "section",
                          "description": "Section for setup additional monitoring and control functions.",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            {
                              "key": "accounts[].atwDevices[]",
                              "type": "tabarray",
                              "title": "{{ value.title }}",
                              "items": [
                                {
                                  "title": "Sensors",
                                  "items": [
                                    "accounts[].atwDevices[].temperatureOutdoorSensor",
                                    "accounts[].atwDevices[].temperatureRoomSensor",
                                    "accounts[].atwDevices[].temperatureFlowSensor",
                                    "accounts[].atwDevices[].temperatureReturnSensor",
                                    "accounts[].atwDevices[].temperatureRoomZone1Sensor",
                                    "accounts[].atwDevices[].temperatureFlowZone1Sensor",
                                    "accounts[].atwDevices[].temperatureReturnZone1Sensor",
                                    "accounts[].atwDevices[].temperatureWaterTankSensor",
                                    "accounts[].atwDevices[].temperatureFlowWaterTankSensor",
                                    "accounts[].atwDevices[].temperatureReturnWaterTankSensor",
                                    "accounts[].atwDevices[].temperatureRoomZone2Sensor",
                                    "accounts[].atwDevices[].temperatureFlowZone2Sensor",
                                    "accounts[].atwDevices[].temperatureReturnZone2Sensor",
                                    "accounts[].atwDevices[].inStandbySensor",
                                    "accounts[].atwDevices[].connectSensor",
                                    "accounts[].atwDevices[].errorSensor"
                                  ]
                                },
                                {
                                  "title": "Functions",
                                  "items": [
                                    "accounts[].atwDevices[].frostProtectionSupport",
                                    "accounts[].atwDevices[].holidayModeSupport"
                                  ]
                                },
                                {
                                  "title": "Custom Functions",
                                  "items": [
                                    {
                                      "key": "accounts[].atwDevices[].buttonsSensors",
                                      "type": "tabarray",
                                      "title": "{{ value.name || 'Function' }}",
                                      "items": [
                                        "accounts[].atwDevices[].buttonsSensors[].displayType",
                                        "accounts[].atwDevices[].buttonsSensors[].mode",
                                        "accounts[].atwDevices[].buttonsSensors[].name",
                                        "accounts[].atwDevices[].buttonsSensors[].namePrefix"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "title": "Energy Recovery Ventilation",
              "items": [
                {
                  "key": "accounts[].ervDevices",
                  "type": "tabarray",
                  "title": "{{ value.name || 'Ventilation' }}",
                  "items": [
                    {
                      "key": "accounts[].ervDevices[]",
                      "items": [
                        {
                          "key": "accounts[].ervDevices[].id",
                          "readonly": true
                        },
                        "accounts[].ervDevices[].displayType",
                        {
                          "title": "Settings",
                          "description": "Section for setup device settings",
                          "type": "section",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            "accounts[].ervDevices[].name"
                          ]
                        },
                        {
                          "title": "Presets",
                          "type": "section",
                          "description": "Section for setup device presets",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            {
                              "key": "accounts[].ervDevices[].presets",
                              "type": "tabarray",
                              "title": "{{ value.name || 'Preset' }}",
                              "items": [
                                {
                                  "key": "accounts[].ervDevices[].presets[].id",
                                  "readonly": true
                                },
                                "accounts[].ervDevices[].presets[].displayType",
                                "accounts[].ervDevices[].presets[].name",
                                "accounts[].ervDevices[].presets[].namePrefix"
                              ]
                            }
                          ],
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloud';"
                          }
                        },
                        {
                          "title": "Scenes",
                          "type": "section",
                          "description": "Section for setup device scenes",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            {
                              "key": "accounts[].ervDevices[].scenes",
                              "type": "tabarray",
                              "title": "{{ value.name || 'Scene' }}",
                              "items": [
                                {
                                  "key": "accounts[].ervDevices[].scenes[].id",
                                  "readonly": true
                                },
                                "accounts[].ervDevices[].scenes[].displayType",
                                "accounts[].ervDevices[].scenes[].name",
                                "accounts[].ervDevices[].scenes[].namePrefix"
                              ]
                            }
                          ],
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
                          }
                        },
                        {
                          "title": "Schedules",
                          "type": "section",
                          "description": "Section for setup device schedules",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            {
                              "key": "accounts[].ervDevices[].schedules",
                              "type": "tabarray",
                              "title": "{{ value.name || 'Schedule' }}",
                              "items": [
                                {
                                  "key": "accounts[].ervDevices[].schedules[].id",
                                  "readonly": true
                                },
                                "accounts[].ervDevices[].schedules[].displayType",
                                "accounts[].ervDevices[].schedules[].name",
                                "accounts[].ervDevices[].schedules[].namePrefix"
                              ]
                            }
                          ],
                          "condition": {
                            "functionBody": "return model.accounts[arrayIndices[0]].type === 'melcloudhome';"
                          }
                        },
                        {
                          "title": "Monitoring And Control",
                          "type": "section",
                          "description": "Section for setup additional monitoring and control functions.",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            {
                              "key": "accounts[].ervDevices[]",
                              "type": "tabarray",
                              "title": "{{ value.title }}",
                              "items": [
                                {
                                  "title": "Sensors",
                                  "items": [
                                    "accounts[].ervDevices[].temperatureOutdoorSensor",
                                    "accounts[].ervDevices[].temperatureRoomSensor",
                                    "accounts[].ervDevices[].temperatureSensorSupply",
                                    "accounts[].ervDevices[].inStandbySensor",
                                    "accounts[].ervDevices[].connectSensor",
                                    "accounts[].ervDevices[].errorSensor"
                                  ]
                                },
                                {
                                  "title": "Functions",
                                  "items": [
                                    "accounts[].ervDevices[].holidayModeSupport"
                                  ]
                                },
                                {
                                  "title": "Custom Functions",
                                  "items": [
                                    {
                                      "key": "accounts[].ervDevices[].buttonsSensors",
                                      "type": "tabarray",
                                      "title": "{{ value.name || 'Function' }}",
                                      "items": [
                                        "accounts[].ervDevices[].buttonsSensors[].displayType",
                                        "accounts[].ervDevices[].buttonsSensors[].mode",
                                        "accounts[].ervDevices[].buttonsSensors[].name",
                                        "accounts[].ervDevices[].buttonsSensors[].namePrefix"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "key": "accounts[]",
          "type": "section",
          "title": "Advanced Settings",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "key": "accounts[]",
              "type": "tabarray",
              "title": "{{ value.name || '' }}",
              "items": [
                {
                  "title": "Account",
                  "items": [
                    "accounts[].refreshInterval"
                  ]
                },
                {
                  "key": "accounts[].log",
                  "title": "Log",
                  "items": [
                    "accounts[].log.deviceInfo",
                    "accounts[].log.success",
                    "accounts[].log.info",
                    "accounts[].log.warn",
                    "accounts[].log.error",
                    "accounts[].log.debug"
                  ]
                },
                {
                  "title": "External Integrations",
                  "items": [
                    {
                      "key": "accounts[]",
                      "type": "tabarray",
                      "title": "{{ value.title }}",
                      "items": [
                        {
                          "key": "accounts[].restFul",
                          "title": "RESTFul",
                          "items": [
                            "accounts[].restFul.enable"
                          ]
                        },
                        {
                          "key": "accounts[].mqtt",
                          "title": "MQTT",
                          "items": [
                            "accounts[].mqtt.enable",
                            "accounts[].mqtt.host",
                            "accounts[].mqtt.port",
                            "accounts[].mqtt.clientId",
                            "accounts[].mqtt.prefix",
                            {
                              "key": "accounts[].mqtt.auth",
                              "title": "Authorization",
                              "items": [
                                "accounts[].mqtt.auth.enable",
                                "accounts[].mqtt.auth.user",
                                {
                                  "key": "accounts[].mqtt.auth.passwd",
                                  "type": "password"
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}