forked from andrew-codechimp/HA-Battery-Notes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.json
54 lines (54 loc) · 1.97 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/andrew-codechimp/HA-Battery-Notes.schema.json",
"title": "Battery Notes Library",
"description": "Library of battery types for devices",
"type": "object",
"properties": {
"$schema": {
"description": "Schema reference",
"type": "string"
},
"version": {
"description": "Version of the library schema",
"type": "integer"
},
"devices": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"manufacturer",
"model",
"battery_type"
],
"properties": {
"manufacturer": {
"type": "string",
"description": "The manufacturer of the device as it appears in Home Assistant."
},
"model": {
"type": "string",
"description": "The model of the device as it appears in Home Assistant."
},
"battery_type": {
"type": "string",
"description": "The type of battery for the device. Should be the most common naming for general batteries, and the IEC naming for battery cells according to Wikipedia."
},
"battery_quantity": {
"type": "integer",
"exclusiveMinimum": 1,
"description": "The number of batteries required by the device. If a device only has one battery this property should be omitted."
}
}
}
}
},
"additionalProperties": false,
"required": [
"$schema",
"version",
"devices"
]
}