evcc-io/templates/definition/devices-schema.json
Andreas Linde 9ec63b4d91
Template schema updates
Some changes where not reflected in the schema
2022-10-08 13:48:29 +02:00

119 lines
No EOL
2.6 KiB
JSON

{
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "EVCC device templates schema",
"$ref": "#/definitions/root",
"definitions": {
"root": {
"type": "object",
"additionalProperties": false,
"properties": {
"template": {
"$": "#/definitions/Template"
},
"covers": {
"type": "array",
"items": {
"type": "string"
}
},
"products": {
"type": "array",
"items": {
"$ref": "#/definitions/Product"
}
},
"group": {
"$ref": "#/definitions/Groups"
},
"linked": {
"type": "array",
"items": {
"$ref": "#/definitions/Linked"
}
},
"capabilities": {
"type": "array",
"items": {
"$ref": "#/definitions/Capability"
}
},
"requirements": {
"$ref": "common-schema.json#/definitions/Requirements"
},
"params": {
"type": "array",
"items": {
"$ref": "common-schema.json#/definitions/ParamDevice"
}
},
"render": {
"type": "string"
}
},
"required": [
"template",
"products",
"params",
"render"
]
},
"Template": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
}
},
"required": ["name"],
"title": "Template"
},
"Product": {
"type": "object",
"additionalProperties": false,
"properties": {
"brand": {
"type": "string"
},
"description": {
"$ref": "common-schema.json#/definitions/LanguageText"
}
},
"anyOf": [
{"required": ["brand"]},
{"required": ["description"]}
],
"title": "Product"
},
"Groups": {
"type": "string",
"enum": ["generic", "switchsockets", "scooter", "sockets"]
},
"Linked": {
"type": "object",
"additionalProperties": false,
"properties": {
"template": {
"type": "string",
"minLength": 1
},
"usage": {
"type": "string",
"enum": ["grid", "pv", "battery"]
},
"multiple": {
"type": "boolean"
},
"excludetemplate": {
"type": "string",
"minLength": 1
}
},
"required": ["template", "usage"]
},
"Capability": {
"type": "string",
"enum": ["1p3p", "iso151182", "rfid", "smahems", "mA"]
}
}
}