mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-05-02 21:52:26 +00:00
45 lines
1.1 KiB
JSON
45 lines
1.1 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"type": "object",
|
|
"properties": {
|
|
"title": { "type": "string" },
|
|
"items": { "$ref": "#/$defs/items" },
|
|
"required": ["title", "items"],
|
|
"additionalProperties": false
|
|
},
|
|
"$defs": {
|
|
"item": {
|
|
"type": "object",
|
|
"properties": {
|
|
"entity": { "$ref": "#/$defs/entity" },
|
|
"name": { "type": "string" },
|
|
"type": { "enum": ["toggle", "tap"] }
|
|
},
|
|
"required": ["entity", "name", "type"],
|
|
"additionalProperties": false
|
|
},
|
|
"menu": {
|
|
"type": "object",
|
|
"properties": {
|
|
"entity": { "$ref": "#/$defs/entity" },
|
|
"name": { "type": "string" },
|
|
"title": { "type": "string" },
|
|
"type": { "const": "group" },
|
|
"items": { "$ref": "#/$defs/items" }
|
|
},
|
|
"required": ["entity", "name", "title", "type", "items"],
|
|
"additionalProperties": false
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"oneOf": [{ "$ref": "#/$defs/item" }, { "$ref": "#/$defs/menu" }]
|
|
}
|
|
},
|
|
"entity": {
|
|
"type": "string",
|
|
"pattern": "^[^.]+\\.[^.]+$"
|
|
}
|
|
}
|
|
}
|