mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-04-30 20:52:27 +00:00
Create config.schema.json
This commit is contained in:
41
config.schema.json
Normal file
41
config.schema.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": { "type": "string" },
|
||||
"items": { "$ref": "#/$defs/items" },
|
||||
"additionalProperties": false
|
||||
},
|
||||
"$defs": {
|
||||
"item": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity": { "$ref": "#/$defs/entity" },
|
||||
"name": { "type": "string" },
|
||||
"type": { "enum": ["toggle", "tap"] }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"menu": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity": { "$ref": "#/$defs/entity" },
|
||||
"name": { "type": "string" },
|
||||
"title": { "type": "string" },
|
||||
"type": { "const": "group" },
|
||||
"items": { "$ref": "#/$defs/items" }
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [{ "$ref": "#/$defs/item" }, { "$ref": "#/$defs/menu" }]
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"type": "string",
|
||||
"pattern": "^[^.]+\\.[^.]+$"
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user