evcc-io/templates/definition/devices-schema.json
2025-02-08 14:55:37 +01:00

156 lines
No EOL
3.1 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"
}
},
"countries": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$"
}
},
"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",
"heating",
"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",
"battery-control",
"iso151182",
"rfid",
"smahems",
"mA"
]
}
}
}