{
  "elements": [
    {
      "type": "ExpansionPanel",
      "caption": "Information",
      "expanded": true,
      "items": [
        {
          "type": "ValidationTextBox",
          "name": "DeviceID",
          "caption": "Device ID"
        }
      ]
    },
    {
      "type": "ExpansionPanel",
      "caption": "Expert",
      "items": [
        {
          "type": "CheckBox",
          "name": "EnableExpertDebug",
          "caption": "Enable extended debug output"
        },
        {
          "type": "CheckBox",
          "name": "ShowTechnicalEntityColumns",
          "caption": "Show technical entity columns"
        },
        {
          "type": "CheckBox",
          "name": "ShowUnavailableEntitiesJson",
          "caption": "Show unavailable entities JSON"
        },
        {
          "type": "NumberSpinner",
          "name": "OutputBufferSize",
          "caption": "Output buffer (MB)",
          "minimum": 0,
          "maximum": 100,
          "value": 10
        }
      ]
    }
  ],
  "actions": [
    {
      "type": "Label",
      "name": "CURRENT_FILTER",
      "caption": "Current filter (regex):",
      "visible": false
    },
    {
      "type": "ExpansionPanel",
      "caption": "Resolved Configuration",
      "expanded": true,
      "items": [
        {
          "type": "Label",
          "name": "DeviceName",
          "caption": "Device name (HA): "
        },
        {
          "type": "Label",
          "name": "DeviceArea",
          "caption": "Area: "
        },
        {
          "type": "List",
          "name": "ResolvedConfig",
          "caption": "Resolved Entities",
          "rowCount": 10,
          "loadValuesFromConfiguration": false,
          "add": false,
          "delete": false,
          "onEdit": "IPS_RequestAction($id, 'UpdateEntityActive', json_encode($ResolvedConfig));",
          "form": [
            {
              "type": "CheckBox",
              "name": "create_var",
              "caption": "Active"
            },
            {
              "type": "ValidationTextBox",
              "name": "domain",
              "caption": "Domain"
            },
            {
              "type": "ValidationTextBox",
              "name": "name",
              "caption": "Name"
            },
            {
              "type": "ValidationTextBox",
              "name": "entity_id",
              "caption": "Entitäts-ID",
              "width": "500px"
            },
            {
              "type": "ValidationTextBox",
              "name": "device_class",
              "caption": "Device class"
            },
            {
              "type": "Label",
              "caption": " "
            },
            {
              "type": "Label",
              "caption": " "
            },
            {
              "type": "ValidationTextBox",
              "name": "attributes",
              "caption": "Attributes (JSON)",
              "multiline": true,
              "width": "500px",
              "rows": 12
            }
          ],
          "columns": [
            {
              "caption": "Domain",
              "name": "domain",
              "width": "150px"
            },
            {
              "caption": "Name",
              "name": "name",
              "width": "auto"
            },
            {
              "caption": "Entity ID (e.g. light.floorlamp)",
              "name": "entity_id",
              "width": "250px",
              "visible": false
            },
            {
              "caption": "Device class",
              "name": "device_class",
              "width": "140px"
            },
            {
              "caption": "Active",
              "name": "create_var",
              "width": "70px",
              "save": false,
              "edit": {
                "type": "CheckBox"
              }
            },
            {
              "caption": "Attributes (JSON)",
              "name": "attributes",
              "visible": false
            }
          ]
        }
      ]
    },
    {
      "type": "ExpansionPanel",
      "caption": "Diagnostics",
      "expanded": false,
      "items": [
        {
          "type": "Label",
          "name": "DiagLastMQTT",
          "caption": "Last MQTT message: never"
        },
        {
          "type": "Label",
          "name": "DiagLastREST",
          "caption": "Last REST fetch: never"
        },
        {
          "type": "Label",
          "name": "DiagEntityCount",
          "caption": "Entities (active): 0"
        }
      ]
    },
    {
      "type": "TestCenter"
    }
  ],
  "status": [
    {
      "code": 201,
      "icon": "error",
      "caption": "No compatible or active parent connected"
    },
    {
      "code": 202,
      "icon": "error",
      "caption": "MQTT base topic missing"
    },
    {
      "code": 210,
      "icon": "error",
      "caption": "No device ID configured"
    },
    {
      "code": 211,
      "icon": "error",
      "caption": "Device not found in Home Assistant"
    }
  ]
}
