Skip to content

Commit

Permalink
chore: update schema (#17930)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored Jan 5, 2025
1 parent 5b21646 commit e4f8d24
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 14 deletions.
7 changes: 0 additions & 7 deletions templates/definition/common-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,20 +199,13 @@
"enum": [
"string",
"bool",
"number",
"float",
"int",
"list",
"chargemodes",
"duration"
]
},
"validvalues": {
"type": "array",
"items": {
"type": "string"
}
},
"choice": {
"type": "array",
"items": {
Expand Down
1 change: 1 addition & 0 deletions templates/definition/defaults-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
},
"required": [
"generic",
"heating",
"sockets",
"switchsockets",
"scooter"
Expand Down
44 changes: 37 additions & 7 deletions templates/definition/devices-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@
"type": "string"
}
},
"required": ["name"],
"required": [
"name"
],
"title": "Template"
},
"Product": {
Expand All @@ -80,14 +82,28 @@
}
},
"anyOf": [
{"required": ["brand"]},
{"required": ["description"]}
{
"required": [
"brand"
]
},
{
"required": [
"description"
]
}
],
"title": "Product"
},
"Groups": {
"type": "string",
"enum": ["generic", "switchsockets", "scooter", "sockets"]
"enum": [
"generic",
"heating",
"switchsockets",
"scooter",
"sockets"
]
},
"Linked": {
"type": "object",
Expand All @@ -99,7 +115,11 @@
},
"usage": {
"type": "string",
"enum": ["grid", "pv", "battery"]
"enum": [
"grid",
"pv",
"battery"
]
},
"multiple": {
"type": "boolean"
Expand All @@ -109,11 +129,21 @@
"minLength": 1
}
},
"required": ["template", "usage"]
"required": [
"template",
"usage"
]
},
"Capability": {
"type": "string",
"enum": ["1p3p", "iso151182", "rfid", "smahems", "mA"]
"enum": [
"1p3p",
"battery-control",
"iso151182",
"rfid",
"smahems",
"mA"
]
}
}
}

0 comments on commit e4f8d24

Please sign in to comment.