{
  "pluginAlias": "enphaseEnvoy",
  "pluginType": "platform",
  "singular": true,
  "fixArrays": true,
  "strictValidation": true,
  "headerDisplay": "This plugin works with Enphase Photovoltaic system. Devices exposed to the HomeKit needs to be added manually.",
  "footerDisplay": "For documentation, please see [GitHub repository](https://github.com/grzegorz914/homebridge-enphase-envoy).",
  "schema": {
    "type": "object",
    "properties": {
      "devices": {
        "title": "Devices",
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "title": "Accessory name",
              "type": "string",
              "placeholder": "Accessory name",
              "description": "Accessory name to be displayed in Home app",
              "required": true
            },
            "host": {
              "title": "IP/Hostname",
              "type": "string",
              "placeholder": "IP address or hostname",
              "format": "hostname",
              "description": "IP Address or hostname of the Enphase Envoy gateway (defaults to envoy.local). For firmware v7+, please set the IP address.",
              "required": false
            },
            "displayType": {
              "title": "Accessory type",
              "type": "integer",
              "minimum": 0,
              "maximum": 4,
              "default": 1,
              "oneOf": [
                {
                  "title": "None/Disabled",
                  "enum": [
                    0
                  ]
                },
                {
                  "title": "Light Bulb",
                  "enum": [
                    1
                  ]
                },
                {
                  "title": "Fan",
                  "enum": [
                    2
                  ]
                },
                {
                  "title": "Humidity Sensor",
                  "enum": [
                    3
                  ]
                },
                {
                  "title": "Carbon Monoxide Sensor",
                  "enum": [
                    4
                  ]
                }
              ],
              "description": "Accessory type for Home app",
              "required": true
            },
            "envoyFirmware7xxTokenGenerationMode": {
              "title": "Envoy Credentials Mode",
              "type": "integer",
              "minimum": 0,
              "maximum": 2,
              "default": 0,
              "oneOf": [
                {
                  "title": "Envoy password",
                  "enum": [
                    0
                  ]
                },
                {
                  "title": "Enlighten credentials",
                  "enum": [
                    1
                  ]
                },
                {
                  "title": "Self-generated token",
                  "enum": [
                    2
                  ]
                }
              ],
              "description": "Method used login to Envoy api",
              "required": true
            },
            "envoyPasswd": {
              "title": "Envoy password",
              "type": "string",
              "placeholder": "Envoy password",
              "description": "Envoy password (only if you altered the default password)",
              "format": "password",
              "condition": {
                "functionBody": "return model.devices[arrayIndices].envoyFirmware7xxTokenGenerationMode === 0;"
              },
              "required": false
            },
            "enlightenUser": {
              "title": "Enlighten username/email address",
              "type": "string",
              "placeholder": "user@example.com",
              "description": "Enphase Enlighten username.",
              "condition": {
                "functionBody": "return model.devices[arrayIndices].envoyFirmware7xxTokenGenerationMode === 1;"
              },
              "required": false
            },
            "enlightenPasswd": {
              "title": "Enlighten password",
              "type": "string",
              "placeholder": "password",
              "description": "Enlighten password",
              "format": "password",
              "condition": {
                "functionBody": "return model.devices[arrayIndices].envoyFirmware7xxTokenGenerationMode === 1;"
              },
              "required": false
            },
            "envoyToken": {
              "title": "Envoy token",
              "type": "string",
              "placeholder": "Token",
              "description": "Provide self-generated token (if relevant)",
              "format": "password",
              "condition": {
                "functionBody": "return model.devices[arrayIndices].envoyFirmware7xxTokenGenerationMode === 2;"
              },
              "required": false
            },
            "envoyTokenInstaller": {
              "title": "Installer",
              "type": "boolean",
              "default": false,
              "description": "Enable for installer-provided token",
              "condition": {
                "functionBody": "return model.devices[arrayIndices].envoyFirmware7xxTokenGenerationMode === 2;"
              },
              "required": true
            },
            "productionStateControl": {
              "title": "Production State Control",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Switch",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Outlet",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Lightbulb",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type in Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Accessory name",
                  "description": "Accessory name",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].productionStateControl.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].productionStateControl.displayType > 0;"
                  }
                }
              }
            },
            "productionStateSensor": {
              "title": "Production State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type in Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Accessory name",
                  "description": "Accessory name",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].productionStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].productionStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "plcLevelControl": {
              "title": "PLC Level Refresh Control",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Switch",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Outlet",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Lightbulb",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Accessory name",
                  "description": "Accessory name for Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].plcLevelControl.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].plcLevelControl.displayType > 0;"
                  }
                }
              }
            },
            "powerProductionSummary": {
              "title": "Power Summary",
              "type": "integer",
              "minimum": 1,
              "default": 1000,
              "description": "Using the Enphase app, provide the total (W) of all microinverters (used to calculate percentage)",
              "required": true
            },
            "powerProductionStateSensor": {
              "title": "Power State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].powerProductionStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].powerProductionStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "powerProductionLevelSensors": {
              "title": "Sensors",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Motion Sensor",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Occupancy Sensor",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Contact Sensor",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type for Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Sensor name",
                    "description": "Name for the sensor accessory in the Home app",
                    "required": false
                  },
                  "compareMode": {
                    "title": "Comparison mode",
                    "type": "integer",
                    "default": 0,
                    "oneOf": [
                      {
                        "title": ">",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": ">=",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "==",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "<",
                        "enum": [
                          3
                        ]
                      },
                      {
                        "title": "<=",
                        "enum": [
                          4
                        ]
                      }
                    ],
                    "description": "Comparison mode",
                    "required": true
                  },
                  "powerLevel": {
                    "title": "Power Level",
                    "type": "integer",
                    "minimum": 0,
                    "description": "Power level in (W) for comparison to sensor that was triggered",
                    "required": false
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "energyProductionStateSensor": {
              "title": "Energy State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].energyProductionStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].energyProductionStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "energyProductionLevelSensors": {
              "title": "Sensors",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Motion Sensor",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Occupancy Sensor",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Contact Sensor",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type for Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Sensor name",
                    "description": "Name for the sensor accessory in the Home app",
                    "required": false
                  },
                  "compareMode": {
                    "title": "Comparison mode",
                    "type": "integer",
                    "default": 0,
                    "oneOf": [
                      {
                        "title": ">",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": ">=",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "==",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "<",
                        "enum": [
                          3
                        ]
                      },
                      {
                        "title": "<=",
                        "enum": [
                          4
                        ]
                      }
                    ],
                    "description": "Comparison mode",
                    "required": true
                  },
                  "energyLevel": {
                    "title": "Enargy Level",
                    "type": "integer",
                    "minimum": 0,
                    "default": 0,
                    "description": "Energy level in (Wh) to compare to sensor that was triggered",
                    "required": false
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "energyProductionLifetimeOffset": {
              "title": "Energy Lifetime Offset",
              "type": "integer",
              "default": 0,
              "description": "Here set offset in (Wh) for energy production (if needed)",
              "required": false
            },
            "powerConsumptionTotalStateSensor": {
              "title": "Power State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].powerConsumptionTotalStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].powerConsumptionTotalStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "powerConsumptionTotalLevelSensors": {
              "title": "Sensors",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Motion Sensor",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Occupancy Sensor",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Contact Sensor",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type for Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Sensor name",
                    "description": "Name for the sensor accessory in the Home app",
                    "required": false
                  },
                  "compareMode": {
                    "title": "Comparison mode",
                    "type": "integer",
                    "default": 0,
                    "oneOf": [
                      {
                        "title": ">",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": ">=",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "==",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "<",
                        "enum": [
                          3
                        ]
                      },
                      {
                        "title": "<=",
                        "enum": [
                          4
                        ]
                      }
                    ],
                    "description": "Comparison mode",
                    "required": true
                  },
                  "powerLevel": {
                    "title": "Power Level",
                    "type": "integer",
                    "minimum": 0,
                    "default": 0,
                    "description": "Power level in (W) for comparison to sensor that was triggered",
                    "required": false
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "energyConsumptionTotalLifetimeOffset": {
              "title": "Energy Lifetime Offset",
              "type": "integer",
              "default": 0,
              "description": "Offset in (Wh) for energy consumption total (if needed)",
              "required": false
            },
            "energyConsumptionTotalStateSensor": {
              "title": "Energy State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].energyConsumptionTotalStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].energyConsumptionTotalStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "energyConsumptionTotalLevelSensors": {
              "title": "Sensors",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Motion Sensor",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Occupancy Sensor",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Contact Sensor",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type for Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Sensor name",
                    "description": "Name for the sensor accessory in the Home app",
                    "required": false
                  },
                  "compareMode": {
                    "title": "Comparison mode",
                    "type": "integer",
                    "default": 0,
                    "oneOf": [
                      {
                        "title": ">",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": ">=",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "==",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "<",
                        "enum": [
                          3
                        ]
                      },
                      {
                        "title": "<=",
                        "enum": [
                          4
                        ]
                      }
                    ],
                    "description": "Comparison mode",
                    "required": true
                  },
                  "energyLevel": {
                    "title": "Enargy Level",
                    "type": "integer",
                    "minimum": 0,
                    "default": 0,
                    "description": "Energy level in (Wh) to compare to sensor that was triggered",
                    "required": false
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "powerConsumptionNetStateSensor": {
              "title": "Power State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].powerConsumptionNetStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].powerConsumptionNetStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "powerConsumptionNetLevelSensors": {
              "title": "Sensors",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Motion Sensor",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Occupancy Sensor",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Contact Sensor",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type for Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Sensor name",
                    "description": "Name for the sensor accessory in the Home app",
                    "required": false
                  },
                  "compareMode": {
                    "title": "Comparison mode",
                    "type": "integer",
                    "default": 0,
                    "oneOf": [
                      {
                        "title": ">",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": ">=",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "==",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "<",
                        "enum": [
                          3
                        ]
                      },
                      {
                        "title": "<=",
                        "enum": [
                          4
                        ]
                      }
                    ],
                    "description": "Comparison mode",
                    "required": true
                  },
                  "powerLevel": {
                    "title": "Power Level",
                    "type": "integer",
                    "default": 0,
                    "description": "Here set power level in (W) to compare at which the sensor fired, negative value (-) mean exporting energy to the grid.",
                    "required": false
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "energyConsumptionNetLifetimeOffset": {
              "title": "Energy Lifetime Offset",
              "type": "integer",
              "default": 0,
              "description": "Offset in (Wh) for net energy consumption (if needed)",
              "required": false
            },
            "energyConsumptionNetStateSensor": {
              "title": "Energy State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].energyConsumptionNetStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].energyConsumptionNetStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "energyConsumptionNetLevelSensors": {
              "title": "Sensors",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Motion Sensor",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Occupancy Sensor",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Contact Sensor",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type for Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Sensor name",
                    "description": "Name for the sensor accessory in the Home app",
                    "required": false
                  },
                  "compareMode": {
                    "title": "Comparison mode",
                    "type": "integer",
                    "default": 0,
                    "oneOf": [
                      {
                        "title": ">",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": ">=",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "==",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "<",
                        "enum": [
                          3
                        ]
                      },
                      {
                        "title": "<=",
                        "enum": [
                          4
                        ]
                      }
                    ],
                    "description": "Comparison mode",
                    "required": true
                  },
                  "energyLevel": {
                    "title": "Energy Level",
                    "type": "integer",
                    "minimum": 0,
                    "default": 0,
                    "description": "Here set energy level in (Wh) to compare at which the sensor fired.",
                    "required": false
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "qRelayStateSensor": {
              "title": "State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].qRelayStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].qRelayStateSensor.displayType > 0;"
                  }
                },
                "multiphase": {
                  "title": "Multiphase",
                  "type": "boolean",
                  "default": false,
                  "description": "Enables multiphase support, if present",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].qRelayStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "acBatterieName": {
              "title": "Accessory name",
              "type": "string",
              "placeholder": "Accessory name",
              "description": "Accessory name for Home app, if not set will use default name",
              "required": false
            },
            "acBatterieBackupLevelSummaryAccessory": {
              "title": "AC Baterry Summary Accessory",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 5,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Light Bulb",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Fan",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Humidity Sensor",
                      "enum": [
                        3
                      ]
                    },
                    {
                      "title": "Carbon Monoxide Sensor",
                      "enum": [
                        4
                      ]
                    },
                    {
                      "title": "Battery",
                      "enum": [
                        5
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "minSoc": {
                  "title": "Minimum SoC",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100,
                  "multipleOf": 1,
                  "default": 0,
                  "description": "Minimum SoC level in (%) for ac baterry backup level summary.",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].acBatterieBackupLevelSummaryAccessory.displayType > 0"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].acBatterieBackupLevelSummaryAccessory.displayType > 0"
                  }
                }
              }
            },
            "acBatterieBackupLevelAccessory": {
              "title": "AC Battery Accessory",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Battery",
                      "enum": [
                        1
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "minSoc": {
                  "title": "Minimum SoC",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100,
                  "multipleOf": 1,
                  "default": 0,
                  "description": "Minimum SoC level in (%) for ac battery backup level.",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].acBatterieBackupLevelAccessory.displayType > 0"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].acBatterieBackupLevelAccessory.displayType > 0"
                  }
                }
              }
            },
            "enpowerDryContactsControl": {
              "title": "Dry Contacts Control",
              "type": "boolean",
              "default": false,
              "description": "Enables control over dry contacts state",
              "required": false
            },
            "enpowerDryContactsSensor": {
              "title": "Dry Contacts Sensor",
              "type": "boolean",
              "default": false,
              "description": "Enables monitoring of dry contacts state",
              "required": false
            },
            "enpowerGridStateControl": {
              "title": "Grid State Control",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Switch",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Outlet",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Lightbulb",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type in Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Accessory name",
                  "description": "Accessory name for Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].enpowerGridStateControl.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].enpowerGridStateControl.displayType > 0;"
                  }
                }
              }
            },
            "enpowerGridStateSensor": {
              "title": "Grid State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].enpowerGridStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].enpowerGridStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "enpowerGridModeSensors": {
              "title": "Enepower Grid Sensors",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Motion Sensor",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Occupancy Sensor",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Contact Sensor",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type for Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Sensor name",
                    "description": "Name for the sensor accessory in the Home app",
                    "required": false
                  },
                  "gridMode": {
                    "title": "Mode",
                    "type": "string",
                    "default": "on-grid",
                    "oneOf": [
                      {
                        "title": "Grid On",
                        "enum": [
                          "on-grid"
                        ]
                      },
                      {
                        "title": "Grid Off",
                        "enum": [
                          "off-grid"
                        ]
                      },
                      {
                        "title": "Multimode Grid On",
                        "enum": [
                          "multimode-ongrid"
                        ]
                      },
                      {
                        "title": "Multimode Grid Off",
                        "enum": [
                          "multimode-offgrid"
                        ]
                      },
                      {
                        "title": "Grid Tied",
                        "enum": [
                          "grid-tied"
                        ]
                      },
                      {
                        "title": "Grid Forming",
                        "enum": [
                          "grid-forming"
                        ]
                      }
                    ],
                    "description": "Grid mode",
                    "required": true
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "enchargeName": {
              "title": "Accessory name",
              "type": "string",
              "placeholder": "Accessory name",
              "description": "Accessory name for Home app, if not set will use default name",
              "required": false
            },
            "enchargeBackupLevelSummaryAccessory": {
              "title": "Encharge Summary Accessory",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 5,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Light Bulb",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Fan",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Humidity Sensor",
                      "enum": [
                        3
                      ]
                    },
                    {
                      "title": "Carbon Monoxide Sensor",
                      "enum": [
                        4
                      ]
                    },
                    {
                      "title": "Battery",
                      "enum": [
                        5
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "minSoc": {
                  "title": "Minimum SoC",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100,
                  "multipleOf": 1,
                  "default": 0,
                  "description": "Minimum SoC level in (%) for encharges backup level summary.",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].enchargeBackupLevelSummaryAccessory.displayType > 0"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].enchargeBackupLevelSummaryAccessory.displayType > 0"
                  }
                }
              }
            },
            "enchargeBackupLevelAccessory": {
              "title": "Encharge Accessory",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 1,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Battery",
                      "enum": [
                        1
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "minSoc": {
                  "title": "Minimum SoC",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100,
                  "multipleOf": 1,
                  "default": 0,
                  "description": "Minimum SoC level in (%) for encharge backup level.",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].enchargeBackupLevelAccessory.displayType > 0"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].enchargeBackupLevelAccessory.displayType > 0"
                  }
                }
              }
            },
            "enchargeProfileControls": {
              "title": "Profile Control",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Lightbulb",
                        "enum": [
                          1
                        ]
                      }
                    ],
                    "description": "Accessory type in Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Accessory name",
                    "description": "Accessory name for Home app",
                    "required": false
                  },
                  "profile": {
                    "title": "Profile",
                    "type": "string",
                    "default": "backup",
                    "oneOf": [
                      {
                        "title": "Savings",
                        "enum": [
                          "savings-mode"
                        ]
                      },
                      {
                        "title": "Economy",
                        "enum": [
                          "economy"
                        ]
                      },
                      {
                        "title": "Full Backup",
                        "enum": [
                          "backup"
                        ]
                      },
                      {
                        "title": "Self Consumption",
                        "enum": [
                          "self-consumption"
                        ]
                      },
                      {
                        "title": "Grid Tied",
                        "enum": [
                          "grid-tied"
                        ]
                      },
                      {
                        "title": "Grid Forming",
                        "enum": [
                          "grid-forming"
                        ]
                      }
                    ],
                    "description": "Here select the profile.",
                    "required": true
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "enchargeProfileSensors": {
              "title": "Profile Sensors",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Motion Sensor",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Occupancy Sensor",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Contact Sensor",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type for Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Sensor name",
                    "description": "Name for the sensor accessory in the Home app",
                    "required": false
                  },
                  "profile": {
                    "title": "Profile",
                    "type": "string",
                    "default": "backup",
                    "oneOf": [
                      {
                        "title": "Savings",
                        "enum": [
                          "savings-mode"
                        ]
                      },
                      {
                        "title": "Economy",
                        "enum": [
                          "economy"
                        ]
                      },
                      {
                        "title": "Full Backup",
                        "enum": [
                          "backup"
                        ]
                      },
                      {
                        "title": "Self Consumption",
                        "enum": [
                          "self-consumption"
                        ]
                      },
                      {
                        "title": "Grid Tied",
                        "enum": [
                          "grid-tied"
                        ]
                      },
                      {
                        "title": "Grid Forming",
                        "enum": [
                          "grid-forming"
                        ]
                      }
                    ],
                    "description": "Here select the profile.",
                    "required": true
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "enchargeStateSensor": {
              "title": "State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].enchargeStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].enchargeStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "enchargeGridStateSensor": {
              "title": "Grid State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].enchargeGridStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].enchargeGridStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "enchargeGridModeSensors": {
              "title": "Encharge Grid Sensors",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Motion Sensor",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Occupancy Sensor",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Contact Sensor",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type for Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Sensor name",
                    "description": "Name for the sensor accessory in the Home app",
                    "required": false
                  },
                  "gridMode": {
                    "title": "Mode",
                    "type": "string",
                    "default": "on-grid",
                    "oneOf": [
                      {
                        "title": "Grid On",
                        "enum": [
                          "on-grid"
                        ]
                      },
                      {
                        "title": "Grid Off",
                        "enum": [
                          "off-grid"
                        ]
                      },
                      {
                        "title": "Multimode Grid On",
                        "enum": [
                          "multimode-ongrid"
                        ]
                      },
                      {
                        "title": "Multimode Grid Off",
                        "enum": [
                          "multimode-offgrid"
                        ]
                      },
                      {
                        "title": "Grid Tied",
                        "enum": [
                          "grid-tied"
                        ]
                      },
                      {
                        "title": "Grid Forming",
                        "enum": [
                          "grid-forming"
                        ]
                      }
                    ],
                    "description": "Here select the grid mode.",
                    "required": true
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "enchargeBackupLevelSensors": {
              "title": "Encharge Backup Level Sensors",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Motion Sensor",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Occupancy Sensor",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Contact Sensor",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type for Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Sensor name",
                    "description": "Name for the sensor accessory in the Home app",
                    "required": false
                  },
                  "compareMode": {
                    "title": "Comparison mode",
                    "type": "integer",
                    "default": 0,
                    "oneOf": [
                      {
                        "title": ">",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": ">=",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "==",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "<",
                        "enum": [
                          3
                        ]
                      },
                      {
                        "title": "<=",
                        "enum": [
                          4
                        ]
                      }
                    ],
                    "description": "Comparison mode",
                    "required": true
                  },
                  "backupLevel": {
                    "title": "Level",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100,
                    "multipleOf": 1,
                    "default": 100,
                    "description": "Backup level in (%) to compare to sensor that was triggered",
                    "required": false
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "solarGridStateSensor": {
              "title": "Grid State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].solarGridStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].solarGridStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "solarGridModeSensors": {
              "title": "Solar Grid Sensors",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Motion Sensor",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Occupancy Sensor",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Contact Sensor",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type for Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Sensor name",
                    "description": "Name for the sensor accessory in the Home app",
                    "required": false
                  },
                  "gridMode": {
                    "title": "Mode",
                    "type": "string",
                    "default": "on-grid",
                    "oneOf": [
                      {
                        "title": "Grid On",
                        "enum": [
                          "on-grid"
                        ]
                      },
                      {
                        "title": "Grid Off",
                        "enum": [
                          "off-grid"
                        ]
                      },
                      {
                        "title": "Multimode Grid On",
                        "enum": [
                          "multimode-ongrid"
                        ]
                      },
                      {
                        "title": "Multimode Grid Off",
                        "enum": [
                          "multimode-offgrid"
                        ]
                      },
                      {
                        "title": "Grid Tied",
                        "enum": [
                          "grid-tied"
                        ]
                      },
                      {
                        "title": "Grid Forming",
                        "enum": [
                          "grid-forming"
                        ]
                      }
                    ],
                    "description": "Grid mode",
                    "required": true
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "generatorStateControl": {
              "title": "State Control",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Switch",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Outlet",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Lightbulb",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type in Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Accessory name",
                  "description": "Accessory name for Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].generatorStateControl.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].generatorStateControl.displayType > 0;"
                  }
                }
              }
            },
            "generatorStateSensor": {
              "title": "State Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].generatorStateSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].generatorStateSensor.displayType > 0;"
                  }
                }
              }
            },
            "generatorModeControls": {
              "title": "Mode Control",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Switch",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Outlet",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Lightbulb",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type in Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Mode name",
                    "description": "Accessory name for Home app",
                    "required": false
                  },
                  "mode": {
                    "title": "Mode",
                    "type": "string",
                    "default": "off",
                    "oneOf": [
                      {
                        "title": "Off",
                        "enum": [
                          "off"
                        ]
                      },
                      {
                        "title": "On",
                        "enum": [
                          "on"
                        ]
                      },
                      {
                        "title": "Auto",
                        "enum": [
                          "auto"
                        ]
                      }
                    ],
                    "description": "Mode",
                    "required": true
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "generatorModeSensors": {
              "title": "Mode Sensors",
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "displayType": {
                    "title": "Accessory type",
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 3,
                    "default": 0,
                    "oneOf": [
                      {
                        "title": "None/Disabled",
                        "enum": [
                          0
                        ]
                      },
                      {
                        "title": "Motion Sensor",
                        "enum": [
                          1
                        ]
                      },
                      {
                        "title": "Occupancy Sensor",
                        "enum": [
                          2
                        ]
                      },
                      {
                        "title": "Contact Sensor",
                        "enum": [
                          3
                        ]
                      }
                    ],
                    "description": "Accessory type for Home app",
                    "required": true
                  },
                  "name": {
                    "title": "Accessory name",
                    "type": "string",
                    "placeholder": "Sensor name",
                    "description": "Name for the sensor accessory in the Home app",
                    "required": false
                  },
                  "mode": {
                    "title": "Mode",
                    "type": "string",
                    "default": "off",
                    "oneOf": [
                      {
                        "title": "Off",
                        "enum": [
                          "off"
                        ]
                      },
                      {
                        "title": "On",
                        "enum": [
                          "on"
                        ]
                      },
                      {
                        "title": "Auto",
                        "enum": [
                          "auto"
                        ]
                      }
                    ],
                    "description": "Mode",
                    "required": true
                  },
                  "namePrefix": {
                    "title": "Prefix",
                    "type": "boolean",
                    "default": false,
                    "description": "Use the accessory name as a prefix",
                    "required": false
                  }
                }
              }
            },
            "dataRefreshControl": {
              "title": "Data Refresh Control",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Switch",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Outlet",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Lightbulb",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type in Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Accessory name",
                  "description": "Accessory name for Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].dataRefreshControl.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].dataRefreshControl.displayType > 0;"
                  }
                }
              }
            },
            "dataRefreshSensor": {
              "title": "Data Refresh Sensor",
              "type": "object",
              "properties": {
                "displayType": {
                  "title": "Accessory type",
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 3,
                  "default": 0,
                  "oneOf": [
                    {
                      "title": "None/Disabled",
                      "enum": [
                        0
                      ]
                    },
                    {
                      "title": "Motion Sensor",
                      "enum": [
                        1
                      ]
                    },
                    {
                      "title": "Occupancy Sensor",
                      "enum": [
                        2
                      ]
                    },
                    {
                      "title": "Contact Sensor",
                      "enum": [
                        3
                      ]
                    }
                  ],
                  "description": "Accessory type for Home app",
                  "required": true
                },
                "name": {
                  "title": "Accessory name",
                  "type": "string",
                  "placeholder": "Sensor name",
                  "description": "Name for the sensor accessory in the Home app",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].dataRefreshSensor.displayType > 0;"
                  }
                },
                "namePrefix": {
                  "title": "Prefix",
                  "type": "boolean",
                  "default": false,
                  "description": "Use the accessory name as a prefix",
                  "required": false,
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].dataRefreshSensor.displayType > 0;"
                  }
                }
              }
            },
            "metersDataRefreshTime": {
              "title": "Meters Refresh Time",
              "type": "number",
              "minimum": 0.5,
              "maximum": 60,
              "multipleOf": 0.5,
              "default": 5,
              "description": "Meters data refresh time (seconds)",
              "required": false
            },
            "productionDataRefreshTime": {
              "title": "Production Refresh Time",
              "type": "number",
              "minimum": 0.5,
              "maximum": 60,
              "multipleOf": 0.5,
              "default": 10,
              "description": "Production data refresh time (seconds)",
              "required": false
            },
            "liveDataRefreshTime": {
              "title": "Live Data Refresh Time",
              "type": "number",
              "minimum": 0.5,
              "maximum": 60,
              "multipleOf": 0.5,
              "default": 5,
              "description": "Live data refresh time (seconds)",
              "required": false,
              "condition": {
                "functionBody": "return model.devices[arrayIndices].envoyFirmware7xxTokenGenerationMode > 0;"
              }
            },
            "ensembleDataRefreshTime": {
              "title": "Ensemble Refresh Time",
              "type": "number",
              "minimum": 0.5,
              "maximum": 60,
              "multipleOf": 0.5,
              "default": 15,
              "description": "Ensemble data refresh time (seconds)",
              "required": false,
              "condition": {
                "functionBody": "return model.devices[arrayIndices].envoyFirmware7xxTokenGenerationMode > 0;"
              }
            },
            "disableLogDeviceInfo": {
              "title": "Disable Log Device Info",
              "type": "boolean",
              "default": false,
              "description": "Disable logging device info for every connected device to the network",
              "required": false
            },
            "disableLogInfo": {
              "title": "Disable Log Info",
              "type": "boolean",
              "default": false,
              "required": false
            },
            "disableLogSuccess": {
              "title": "Disable Log Success",
              "type": "boolean",
              "default": false,
              "required": false
            },
            "disableLogWarn": {
              "title": "Disable Log Warn",
              "type": "boolean",
              "default": false,
              "required": false
            },
            "disableLogError": {
              "title": "Disable Log Error",
              "type": "boolean",
              "default": false,
              "required": false
            },
            "enableDebugMode": {
              "title": "Enable Log Debug",
              "type": "boolean",
              "default": false,
              "required": false
            },
            "restFul": {
              "title": "RESTFul",
              "type": "object",
              "properties": {
                "enable": {
                  "title": "Enable",
                  "type": "boolean",
                  "default": false,
                  "description": "Enable REST service"
                },
                "debug": {
                  "title": "Debug",
                  "type": "boolean",
                  "default": false,
                  "description": "Enable debug mode for REST service",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].restFul.enable === true;"
                  },
                  "required": false
                },
                "port": {
                  "title": "TCP port",
                  "type": "integer",
                  "placeholder": 3000,
                  "description": "TCP listening port for REST service",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].restFul.enable === true;"
                  },
                  "required": false
                }
              }
            },
            "mqtt": {
              "title": "MQTT",
              "type": "object",
              "properties": {
                "enable": {
                  "title": "Enable",
                  "type": "boolean",
                  "default": false,
                  "description": "Enable MQTT broker"
                },
                "debug": {
                  "title": "Debug",
                  "type": "boolean",
                  "default": false,
                  "description": "Enable debug mode for MQTT broker",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
                  },
                  "required": false
                },
                "host": {
                  "title": "IP/hostname",
                  "type": "string",
                  "placeholder": "IP or hostname",
                  "format": "hostname",
                  "description": "IP or hostname of MQTT broker",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
                  },
                  "required": false
                },
                "port": {
                  "title": "TCP port",
                  "type": "integer",
                  "placeholder": 1883,
                  "description": "TCP port forf MQTT broker",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
                  },
                  "required": false
                },
                "clientId": {
                  "title": "Client ID",
                  "type": "string",
                  "placeholder": "Client ID",
                  "description": "Optional Client ID for MQTT broker",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true"
                  },
                  "required": false
                },
                "prefix": {
                  "title": "Prefix",
                  "type": "string",
                  "placeholder": "home/envoy",
                  "description": "Prefix",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
                  },
                  "required": false
                },
                "auth": {
                  "title": "Authorization",
                  "type": "boolean",
                  "default": false,
                  "description": "Enable authorization for MQTT broker",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true;"
                  },
                  "required": false
                },
                "user": {
                  "title": "User",
                  "type": "string",
                  "placeholder": "user",
                  "description": "User for MQTT broker",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true && model.devices[arrayIndices].mqtt.auth === true;"
                  },
                  "required": false
                },
                "passwd": {
                  "title": "Password",
                  "type": "string",
                  "placeholder": "password",
                  "description": "Password for MQTT broker",
                  "format": "password",
                  "condition": {
                    "functionBody": "return model.devices[arrayIndices].mqtt.enable === true && model.devices[arrayIndices].mqtt.auth === true;"
                  },
                  "required": false
                }
              }
            }
          }
        }
      }
    }
  },
  "layout": [
    {
      "key": "devices",
      "type": "tabarray",
      "title": "{{ value.name || 'system' }}",
      "items": [
        "devices[].name",
        "devices[].host",
        "devices[].displayType",
        {
          "key": "devices[]",
          "type": "section",
          "title": "Credentials",
          "expandable": true,
          "expanded": false,
          "items": [
            "devices[].envoyFirmware7xxTokenGenerationMode",
            {
              "key": "devices[].envoyPasswd",
              "type": "password"
            },
            "devices[].enlightenUser",
            {
              "key": "devices[].enlightenPasswd",
              "type": "password"
            },
            {
              "key": "devices[].envoyToken",
              "type": "password"
            },
            "devices[].envoyTokenInstaller"
          ],
          "condition": {
            "functionBody": "return model.devices[arrayIndices].displayType > 0;"
          }
        },
        {
          "key": "devices[]",
          "type": "section",
          "title": "Advanced Settings",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "key": "devices[]",
              "type": "tabarray",
              "title": "{{ value.title }}",
              "items": [
                {
                  "key": "devices[]",
                  "title": "Envoy",
                  "items": [
                    {
                      "key": "devices[]",
                      "type": "tabarray",
                      "title": "{{ value.title }}",
                      "items": [
                        {
                          "key": "devices[].productionStateControl",
                          "type": "section",
                          "title": "Production State Control",
                          "description": "Section for enabling additional accessory for production state control (firmware v7.0+ requires installer credentials)",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            "devices[].productionStateControl.displayType",
                            "devices[].productionStateControl.name",
                            "devices[].productionStateControl.namePrefix"
                          ]
                        },
                        {
                          "key": "devices[].productionStateSensor",
                          "type": "section",
                          "title": "Production State Sensor",
                          "description": "Section for enabling sensor for production state monitoring (firmware v7.0+ requires installer credentials)",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            "devices[].productionStateSensor.displayType",
                            "devices[].productionStateSensor.name",
                            "devices[].productionStateSensor.namePrefix"
                          ]
                        },
                        {
                          "key": "devices[].plcLevelControl",
                          "type": "section",
                          "title": "PLC Level Refresh Control",
                          "description": "Section for enabling additional accessory for PLC level refresh control (firmware v7.0+ requires installer credentials)",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            "devices[].plcLevelControl.displayType",
                            "devices[].plcLevelControl.name",
                            "devices[].plcLevelControl.namePrefix"
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "key": "devices[]",
                  "title": "Production",
                  "items": [
                    {
                      "key": "devices[]",
                      "type": "tabarray",
                      "title": "{{ value.title }}",
                      "items": [
                        {
                          "key": "devices[]",
                          "title": "Power",
                          "items": [
                            "devices[].powerProductionSummary",
                            {
                              "key": "devices[].powerProductionStateSensor",
                              "type": "section",
                              "title": "Power State Sensor",
                              "description": "Section for enabling sensor for power state monitoring",
                              "expandable": true,
                              "expanded": false,
                              "items": [
                                "devices[].powerProductionStateSensor.displayType",
                                "devices[].powerProductionStateSensor.name",
                                "devices[].powerProductionStateSensor.namePrefix"
                              ]
                            },
                            {
                              "key": "devices[]",
                              "type": "section",
                              "title": "Power Level Sensors",
                              "description": "Section for creating sensors for power level monitoring",
                              "expandable": true,
                              "expanded": false,
                              "items": [
                                {
                                  "key": "devices[].powerProductionLevelSensors",
                                  "type": "tabarray",
                                  "title": "{{ value.name || 'sensor' }}",
                                  "items": [
                                    "devices[].powerProductionLevelSensors[].displayType",
                                    "devices[].powerProductionLevelSensors[].name",
                                    "devices[].powerProductionLevelSensors[].compareMode",
                                    "devices[].powerProductionLevelSensors[].powerLevel",
                                    "devices[].powerProductionLevelSensors[].namePrefix"
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "key": "devices[]",
                          "title": "Energy",
                          "items": [
                            "devices[].energyProductionLifetimeOffset",
                            {
                              "key": "devices[].energyProductionStateSensor",
                              "type": "section",
                              "title": "Energy State Sensor",
                              "description": "Section for enabling sensor for energy state monitoring",
                              "expandable": true,
                              "expanded": false,
                              "items": [
                                "devices[].energyProductionStateSensor.displayType",
                                "devices[].energyProductionStateSensor.name",
                                "devices[].energyProductionStateSensor.namePrefix"
                              ]
                            },
                            {
                              "key": "devices[]",
                              "type": "section",
                              "title": "Energy Level Sensors",
                              "description": "Section for creating sensors for energy level monitoring",
                              "expandable": true,
                              "expanded": false,
                              "items": [
                                {
                                  "key": "devices[].energyProductionLevelSensors",
                                  "type": "tabarray",
                                  "title": "{{ value.name || 'sensor' }}",
                                  "items": [
                                    "devices[].energyProductionLevelSensors[].displayType",
                                    "devices[].energyProductionLevelSensors[].name",
                                    "devices[].energyProductionLevelSensors[].compareMode",
                                    "devices[].energyProductionLevelSensors[].energyLevel",
                                    "devices[].energyProductionLevelSensors[].namePrefix"
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "key": "devices[]",
                  "title": "Consumption",
                  "items": [
                    {
                      "key": "devices[]",
                      "type": "tabarray",
                      "title": "{{ value.title }}",
                      "items": [
                        {
                          "key": "devices[]",
                          "title": "Total",
                          "items": [
                            {
                              "key": "devices[]",
                              "type": "tabarray",
                              "title": "{{ value.title }}",
                              "items": [
                                {
                                  "key": "devices[]",
                                  "title": "Power",
                                  "items": [
                                    {
                                      "key": "devices[].powerConsumptionTotalStateSensor",
                                      "type": "section",
                                      "title": "Power State Sensor",
                                      "description": "Section for enabling sensor for power state monitoring",
                                      "expandable": true,
                                      "expanded": false,
                                      "items": [
                                        "devices[].powerConsumptionTotalStateSensor.displayType",
                                        "devices[].powerConsumptionTotalStateSensor.name",
                                        "devices[].powerConsumptionTotalStateSensor.namePrefix"
                                      ]
                                    },
                                    {
                                      "key": "devices[]",
                                      "type": "section",
                                      "title": "Power Level Sensors",
                                      "description": "Section for creating sensors for power level monitoring",
                                      "expandable": true,
                                      "expanded": false,
                                      "items": [
                                        {
                                          "key": "devices[].powerConsumptionTotalLevelSensors",
                                          "type": "tabarray",
                                          "title": "{{ value.name || 'sensor' }}",
                                          "items": [
                                            "devices[].powerConsumptionTotalLevelSensors[].displayType",
                                            "devices[].powerConsumptionTotalLevelSensors[].name",
                                            "devices[].powerConsumptionTotalLevelSensors[].compareMode",
                                            "devices[].powerConsumptionTotalLevelSensors[].powerLevel",
                                            "devices[].powerConsumptionTotalLevelSensors[].namePrefix"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "key": "devices[]",
                                  "title": "Energy",
                                  "items": [
                                    "devices[].energyConsumptionTotalLifetimeOffset",
                                    {
                                      "key": "devices[].energyConsumptionTotalStateSensor",
                                      "type": "section",
                                      "title": "Energy State Sensor",
                                      "description": "Section for enabling sensor for energy state monitoring",
                                      "expandable": true,
                                      "expanded": false,
                                      "items": [
                                        "devices[].energyConsumptionTotalStateSensor.displayType",
                                        "devices[].energyConsumptionTotalStateSensor.name",
                                        "devices[].energyConsumptionTotalStateSensor.namePrefix"
                                      ]
                                    },
                                    {
                                      "key": "devices[]",
                                      "type": "section",
                                      "title": "Energy Level Sensors",
                                      "description": "Section for creating sensors for energy level monitoring",
                                      "expandable": true,
                                      "expanded": false,
                                      "items": [
                                        {
                                          "key": "devices[].energyConsumptionTotalLevelSensors",
                                          "type": "tabarray",
                                          "title": "{{ value.name || 'sensor' }}",
                                          "items": [
                                            "devices[].energyConsumptionTotalLevelSensors[].displayType",
                                            "devices[].energyConsumptionTotalLevelSensors[].name",
                                            "devices[].energyConsumptionTotalLevelSensors[].compareMode",
                                            "devices[].energyConsumptionTotalLevelSensors[].energyLevel",
                                            "devices[].energyConsumptionTotalLevelSensors[].namePrefix"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "key": "devices[]",
                          "title": "Net",
                          "items": [
                            {
                              "key": "devices[]",
                              "type": "tabarray",
                              "title": "{{ value.title }}",
                              "items": [
                                {
                                  "key": "devices[]",
                                  "title": "Power",
                                  "items": [
                                    {
                                      "key": "devices[].powerConsumptionNetStateSensor",
                                      "type": "section",
                                      "title": "Power State Sensor",
                                      "description": "Section for enabling sensor for power state monitoring",
                                      "expandable": true,
                                      "expanded": false,
                                      "items": [
                                        "devices[].powerConsumptionNetStateSensor.displayType",
                                        "devices[].powerConsumptionNetStateSensor.name",
                                        "devices[].powerConsumptionNetStateSensor.namePrefix"
                                      ]
                                    },
                                    {
                                      "key": "devices[]",
                                      "type": "section",
                                      "title": "Power Level Sensors",
                                      "description": "Section for creating sensors for power level monitoring",
                                      "expandable": true,
                                      "expanded": false,
                                      "items": [
                                        {
                                          "key": "devices[].powerConsumptionNetLevelSensors",
                                          "type": "tabarray",
                                          "title": "{{ value.name || 'sensor' }}",
                                          "items": [
                                            "devices[].powerConsumptionNetLevelSensors[].displayType",
                                            "devices[].powerConsumptionNetLevelSensors[].name",
                                            "devices[].powerConsumptionNetLevelSensors[].compareMode",
                                            "devices[].powerConsumptionNetLevelSensors[].powerLevel",
                                            "devices[].powerConsumptionNetLevelSensors[].namePrefix"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "key": "devices[]",
                                  "title": "Energy",
                                  "items": [
                                    "devices[].energyConsumptionNetLifetimeOffset",
                                    {
                                      "key": "devices[].energyConsumptionNetStateSensor",
                                      "type": "section",
                                      "title": "Energy State Sensor",
                                      "description": "Section for enabling sensor for energy state monitoring",
                                      "expandable": true,
                                      "expanded": false,
                                      "items": [
                                        "devices[].energyConsumptionNetStateSensor.displayType",
                                        "devices[].energyConsumptionNetStateSensor.name",
                                        "devices[].energyConsumptionNetStateSensor.namePrefix"
                                      ]
                                    },
                                    {
                                      "key": "devices[]",
                                      "type": "section",
                                      "title": "Energy Level Sensors",
                                      "description": "Section for creating sensors for energy level monitoring",
                                      "expandable": true,
                                      "expanded": false,
                                      "items": [
                                        {
                                          "key": "devices[].energyConsumptionNetLevelSensors",
                                          "type": "tabarray",
                                          "title": "{{ value.name || 'sensor' }}",
                                          "items": [
                                            "devices[].energyConsumptionNetLevelSensors[].displayType",
                                            "devices[].energyConsumptionNetLevelSensors[].name",
                                            "devices[].energyConsumptionNetLevelSensors[].compareMode",
                                            "devices[].energyConsumptionNetLevelSensors[].energyLevel",
                                            "devices[].energyConsumptionNetLevelSensors[].namePrefix"
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "key": "devices[]",
                  "title": "Q-Relay",
                  "items": [
                    {
                      "key": "devices[]",
                      "type": "tabarray",
                      "title": "{{ value.title }}",
                      "items": [
                        {
                          "key": "devices[].qRelayStateSensor",
                          "type": "section",
                          "title": "State Sensor",
                          "description": "Section for enabling sensor for q-relay state monitoring",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            "devices[].qRelayStateSensor.displayType",
                            "devices[].qRelayStateSensor.name",
                            "devices[].qRelayStateSensor.namePrefix",
                            "devices[].qRelayStateSensor.multiphase"
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "key": "devices[]",
                  "title": "AC Batteries",
                  "items": [
                    {
                      "key": "devices[]",
                      "type": "tabarray",
                      "title": "{{ value.title }}",
                      "items": [
                        {
                          "key": "devices[]",
                          "type": "section",
                          "title": "Accessory",
                          "items": [
                            "devices[].acBatterieName",
                            {
                              "key": "devices[].acBatterieBackupLevelSummaryAccessory",
                              "type": "section",
                              "title": "Backup Level Summary",
                              "description": "Section for enabling additional accessory for ac batteries backup level summary",
                              "expandable": true,
                              "expanded": false,
                              "items": [
                                "devices[].acBatterieBackupLevelSummaryAccessory.displayType",
                                "devices[].acBatterieBackupLevelSummaryAccessory.minSoc",
                                "devices[].acBatterieBackupLevelSummaryAccessory.namePrefix"
                              ]
                            },
                            {
                              "key": "devices[].acBatterieBackupLevelAccessory",
                              "type": "section",
                              "title": "Backup Level Individual",
                              "description": "Section for enabling additional accessory for ac battery backup level",
                              "expandable": true,
                              "expanded": false,
                              "items": [
                                "devices[].acBatterieBackupLevelAccessory.displayType",
                                "devices[].acBatterieBackupLevelAccessory.minSoc",
                                "devices[].acBatterieBackupLevelAccessory.namePrefix"
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "key": "devices[]",
                  "title": "Ensemble",
                  "items": [
                    {
                      "key": "devices[]",
                      "type": "tabarray",
                      "title": "{{ value.title }}",
                      "items": [
                        {
                          "key": "devices[]",
                          "title": "Enpower",
                          "items": [
                            "devices[].enpowerDryContactsControl",
                            "devices[].enpowerDryContactsSensor",
                            {
                              "key": "devices[]",
                              "type": "tabarray",
                              "title": "{{ value.title }}",
                              "items": [
                                {
                                  "key": "devices[].enpowerGridStateControl",
                                  "type": "section",
                                  "title": "Grid State Control",
                                  "description": "Section for enabling additional accessory for grid state control",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    "devices[].enpowerGridStateControl.displayType",
                                    "devices[].enpowerGridStateControl.name",
                                    "devices[].enpowerGridStateControl.namePrefix"
                                  ]
                                },
                                {
                                  "key": "devices[].enpowerGridStateSensor",
                                  "type": "section",
                                  "title": "Grid State Sensor",
                                  "description": "Section for enabling sensor for grid state monitoring",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    "devices[].enpowerGridStateSensor.displayType",
                                    "devices[].enpowerGridStateSensor.name",
                                    "devices[].enpowerGridStateSensor.namePrefix"
                                  ]
                                },
                                {
                                  "key": "devices[]",
                                  "type": "section",
                                  "title": "Grid Mode Sensors",
                                  "description": "Section for creating sensors for grid mode monitoring",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    {
                                      "key": "devices[].enpowerGridModeSensors",
                                      "type": "tabarray",
                                      "title": "{{ value.name || 'sensor' }}",
                                      "items": [
                                        "devices[].enpowerGridModeSensors[].displayType",
                                        "devices[].enpowerGridModeSensors[].name",
                                        "devices[].enpowerGridModeSensors[].gridMode",
                                        "devices[].enpowerGridModeSensors[].namePrefix"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "key": "devices[]",
                          "title": "Encharges",
                          "items": [
                            {
                              "key": "devices[]",
                              "type": "tabarray",
                              "title": "{{ value.title }}",
                              "items": [
                                {
                                  "key": "devices[]",
                                  "type": "section",
                                  "title": "Accessory",
                                  "items": [
                                    "devices[].enchargeName",
                                    {
                                      "key": "devices[].enchargeBackupLevelSummaryAccessory",
                                      "type": "section",
                                      "title": "Backup Level Summary",
                                      "description": "Section for enabling additional accessory for encharges backup level summary",
                                      "expandable": true,
                                      "expanded": false,
                                      "items": [
                                        "devices[].enchargeBackupLevelSummaryAccessory.displayType",
                                        "devices[].enchargeBackupLevelSummaryAccessory.minSoc",
                                        "devices[].enchargeBackupLevelSummaryAccessory.namePrefix"
                                      ]
                                    },
                                    {
                                      "key": "devices[].enchargeBackupLevelAccessory",
                                      "type": "section",
                                      "title": "Backup Level Individual",
                                      "description": "Section for enabling additional accessory for encharge backup level",
                                      "expandable": true,
                                      "expanded": false,
                                      "items": [
                                        "devices[].enchargeBackupLevelAccessory.displayType",
                                        "devices[].enchargeBackupLevelAccessory.minSoc",
                                        "devices[].enchargeBackupLevelAccessory.namePrefix"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "key": "devices[].enchargeStateSensor",
                                  "type": "section",
                                  "title": "State Sensor",
                                  "description": "Section for enabling sensor for encharges state monitoring",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    "devices[].enchargeStateSensor.displayType",
                                    "devices[].enchargeStateSensor.name",
                                    "devices[].enchargeStateSensor.namePrefix"
                                  ]
                                },
                                {
                                  "key": "devices[]",
                                  "type": "section",
                                  "title": "Profile Controls",
                                  "description": "Section for creating additional accessory for encharge profile control",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    {
                                      "key": "devices[].enchargeProfileControl",
                                      "type": "tabarray",
                                      "title": "{{ value.name || 'control' }}",
                                      "items": [
                                        "devices[].enchargeProfileControl[].displayType",
                                        "devices[].enchargeProfileControl[].name",
                                        "devices[].enchargeProfileControl[].profile",
                                        "devices[].enchargeProfileControl[].namePrefix"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "key": "devices[]",
                                  "type": "section",
                                  "title": "Profile Sensors",
                                  "description": "Section for creating sensors for encharge profile monitoring",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    {
                                      "key": "devices[].enchargeProfileSensors",
                                      "type": "tabarray",
                                      "title": "{{ value.name || 'sensor' }}",
                                      "items": [
                                        "devices[].enchargeProfileSensors[].displayType",
                                        "devices[].enchargeProfileSensors[].name",
                                        "devices[].enchargeProfileSensors[].profile",
                                        "devices[].enchargeProfileSensors[].namePrefix"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "key": "devices[].enchargeGridStateSensor",
                                  "type": "section",
                                  "title": "Grid State Sensor",
                                  "description": "Section for enabling sensor for grid state monitoring",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    "devices[].enchargeGridStateSensor.displayType",
                                    "devices[].enchargeGridStateSensor.name",
                                    "devices[].enchargeGridStateSensor.namePrefix"
                                  ]
                                },
                                {
                                  "key": "devices[]",
                                  "type": "section",
                                  "title": "Grid Mode Sensors",
                                  "description": "Section for enabling sensor for grid mode monitoring",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    {
                                      "key": "devices[].enchargeGridModeSensors",
                                      "type": "tabarray",
                                      "title": "{{ value.name || 'sensor' }}",
                                      "items": [
                                        "devices[].enchargeGridModeSensors[].displayType",
                                        "devices[].enchargeGridModeSensors[].name",
                                        "devices[].enchargeGridModeSensors[].gridMode",
                                        "devices[].enchargeGridModeSensors[].namePrefix"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "key": "devices[]",
                                  "type": "section",
                                  "title": "Backup Level Sensors",
                                  "description": "Section for creating conditional sensors to monitor encharges SoC",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    {
                                      "key": "devices[].enchargeBackupLevelSensors",
                                      "type": "tabarray",
                                      "title": "{{ value.name || 'sensor' }}",
                                      "items": [
                                        "devices[].enchargeBackupLevelSensors[].displayType",
                                        "devices[].enchargeBackupLevelSensors[].name",
                                        "devices[].enchargeBackupLevelSensors[].compareMode",
                                        "devices[].enchargeBackupLevelSensors[].backupLevel",
                                        "devices[].enchargeBackupLevelSensors[].namePrefix"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "key": "devices[]",
                          "title": "Solar",
                          "items": [
                            {
                              "key": "devices[]",
                              "type": "tabarray",
                              "title": "{{ value.title }}",
                              "items": [
                                {
                                  "key": "devices[].solarGridStateSensor",
                                  "type": "section",
                                  "title": "Grid State Sensor",
                                  "description": "Section for enabling sensor for grid state monitoring",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    "devices[].solarGridStateSensor.displayType",
                                    "devices[].solarGridStateSensor.name",
                                    "devices[].solarGridStateSensor.namePrefix"
                                  ]
                                },
                                {
                                  "key": "devices[]",
                                  "type": "section",
                                  "title": "Grid Mode Sensors",
                                  "description": "Section for enabling sensor for grid mode monitoring",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    {
                                      "key": "devices[].solarGridModeSensors",
                                      "type": "tabarray",
                                      "title": "{{ value.name || 'sensor' }}",
                                      "items": [
                                        "devices[].solarGridModeSensors[].displayType",
                                        "devices[].solarGridModeSensors[].name",
                                        "devices[].solarGridModeSensors[].gridMode",
                                        "devices[].solarGridModeSensors[].namePrefix"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        },
                        {
                          "key": "devices[]",
                          "title": "Generator",
                          "items": [
                            {
                              "key": "devices[]",
                              "type": "tabarray",
                              "title": "{{ value.title }}",
                              "items": [
                                {
                                  "key": "devices[].generatorStateControl",
                                  "type": "section",
                                  "title": "State Control",
                                  "description": "Section for enabling additional accessory for state control",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    "devices[].generatorStateControl.displayType",
                                    "devices[].generatorStateControl.name",
                                    "devices[].generatorStateControl.namePrefix"
                                  ]
                                },
                                {
                                  "key": "devices[].generatorStateSensor",
                                  "type": "section",
                                  "title": "State Sensor",
                                  "description": "Section for enabling sensor for generator state monitoring",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    "devices[].generatorStateSensor.displayType",
                                    "devices[].generatorStateSensor.name",
                                    "devices[].generatorStateSensor.namePrefix"
                                  ]
                                },
                                {
                                  "key": "devices[]",
                                  "type": "section",
                                  "title": "Mode Controls",
                                  "description": "Section for creating additional accessories for generator mode control",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    {
                                      "key": "devices[].generatorModeControls",
                                      "type": "tabarray",
                                      "title": "{{ value.name || 'control' }}",
                                      "items": [
                                        "devices[].generatorModeControls[].displayType",
                                        "devices[].generatorModeControls[].name",
                                        "devices[].generatorModeControls[].mode",
                                        "devices[].generatorModeControls[].namePrefix"
                                      ]
                                    }
                                  ]
                                },
                                {
                                  "key": "devices[]",
                                  "type": "section",
                                  "title": "Mode Sensors",
                                  "description": "Section for creating sensors for generator mode monitoring",
                                  "expandable": true,
                                  "expanded": false,
                                  "items": [
                                    {
                                      "key": "devices[].generatorModeSensors",
                                      "type": "tabarray",
                                      "title": "{{ value.name || 'sensor' }}",
                                      "items": [
                                        "devices[].generatorModeSensors[].displayType",
                                        "devices[].generatorModeSensors[].name",
                                        "devices[].generatorModeSensors[].mode",
                                        "devices[].generatorModeSensors[].namePrefix"
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ],
                      "condition": {
                        "functionBody": "return model.devices[arrayIndices].envoyFirmware7xxTokenGenerationMode > 0;"
                      }
                    },
                    {
                      "key": "devices[]",
                      "type": "tabarray",
                      "title": "{{ value.title }}",
                      "items": [],
                      "condition": {
                        "functionBody": "return model.devices[arrayIndices].envoyFirmware7xxTokenGenerationMode === 0;"
                      }
                    }
                  ]
                },
                {
                  "key": "devices[]",
                  "title": "System",
                  "items": [
                    {
                      "key": "devices[]",
                      "type": "tabarray",
                      "title": "{{ value.title }}",
                      "items": [
                        {
                          "key": "devices[]",
                          "type": "section",
                          "title": "Log",
                          "description": "Section for enable/disable individual log.",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            "devices[].disableLogDeviceInfo",
                            "devices[].disableLogInfo",
                            "devices[].disableLogSuccess",
                            "devices[].disableLogWarn",
                            "devices[].disableLogError",
                            "devices[].enableDebugMode"
                          ]
                        },
                        {
                          "key": "devices[]",
                          "type": "section",
                          "title": "Data Refresh",
                          "description": "Section for setting individual data refesh time for devices",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            "devices[].metersDataRefreshTime",
                            "devices[].productionDataRefreshTime",
                            "devices[].liveDataRefreshTime",
                            "devices[].ensembleDataRefreshTime"
                          ]
                        },
                        {
                          "key": "devices[].dataRefreshControl",
                          "type": "section",
                          "title": "Data Refresh Control",
                          "description": "Section for enabling additional accessory for data refresh control",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            "devices[].dataRefreshControl.displayType",
                            "devices[].dataRefreshControl.name",
                            "devices[].dataRefreshControl.namePrefix"
                          ]
                        },
                        {
                          "key": "devices[].dataRefreshSensor",
                          "type": "section",
                          "title": "Data Refresh Sensor",
                          "description": "Section for enabling sensor for data refresh monitoring",
                          "expandable": true,
                          "expanded": false,
                          "items": [
                            "devices[].dataRefreshSensor.displayType",
                            "devices[].dataRefreshSensor.name",
                            "devices[].dataRefreshSensor.namePrefix"
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "key": "devices[]",
                  "title": "External Integrations",
                  "items": [
                    {
                      "key": "devices[]",
                      "type": "tabarray",
                      "title": "{{ value.title }}",
                      "items": [
                        {
                          "key": "devices[].restFul",
                          "title": "RESTFul",
                          "items": [
                            "devices[].restFul.enable",
                            "devices[].restFul.debug",
                            "devices[].restFul.port"
                          ]
                        },
                        {
                          "key": "devices[].mqtt",
                          "title": "MQTT",
                          "items": [
                            "devices[].mqtt.enable",
                            "devices[].mqtt.debug",
                            "devices[].mqtt.host",
                            "devices[].mqtt.port",
                            "devices[].mqtt.clientId",
                            "devices[].mqtt.prefix",
                            "devices[].mqtt.auth",
                            "devices[].mqtt.user",
                            {
                              "key": "devices[].mqtt.passwd",
                              "type": "password"
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ],
          "condition": {
            "functionBody": "return model.devices[arrayIndices].displayType > 0;"
          }
        }
      ]
    }
  ]
}