{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "title": "Device schema",
    "properties": {
        "name": {
            "type": "string",
            "title": "Name of the device"
        },
        "fields": {
            "type": "array",
            "title": "Device fields",
            "items": {
                "$ref": "https://bluetti-community.github.io/bluetti-registers/field.json"
            }
        },
        "pack-fields": {
            "type": "array",
            "title": "Device battery pack fields",
            "items": {
                "$ref": "https://bluetti-community.github.io/bluetti-registers/field.json"
            }
        },
        "max-packs": {
            "type": "integer",
            "title": "Maximum number of battery packs connected to device",
            "minimum": 0
        },
        "contributors": {
            "type": "array",
            "title": "Contributors for this device",
            "items": {
                "type": "string"
            }
        }
    },
    "required": [
        "name",
        "fields"
    ]
}