mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-05-02 21:52:26 +00:00
Restyled by jq
This commit is contained in:
@ -2,47 +2,83 @@
|
|||||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"title": { "type": "string" },
|
"title": {
|
||||||
"items": { "$ref": "#/$defs/items" },
|
"type": "string"
|
||||||
"required": ["title", "items"],
|
},
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/$defs/items"
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"title",
|
||||||
|
"items"
|
||||||
|
],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"$defs": {
|
"$defs": {
|
||||||
"toggle": {
|
"toggle": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": { "$ref": "#/$defs/entity" },
|
"entity": {
|
||||||
"name": { "title": "Your familiar name", "type": "string" },
|
"$ref": "#/$defs/entity"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"title": "Your familiar name",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"title": "Menu item type",
|
"title": "Menu item type",
|
||||||
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
||||||
"const": "toggle"
|
"const": "toggle"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["entity", "name", "type"],
|
"required": [
|
||||||
|
"entity",
|
||||||
|
"name",
|
||||||
|
"type"
|
||||||
|
],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"template": {
|
"template": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": { "$ref": "#/$defs/entity" },
|
"entity": {
|
||||||
"name": { "title": "Your familiar name", "type": "string" },
|
"$ref": "#/$defs/entity"
|
||||||
"content": { "title": "What to display (template)", "type": "string" },
|
},
|
||||||
|
"name": {
|
||||||
|
"title": "Your familiar name",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"title": "What to display (template)",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"title": "Menu item type",
|
"title": "Menu item type",
|
||||||
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
||||||
"const": "template"
|
"const": "template"
|
||||||
},
|
},
|
||||||
"tap_action": { "$ref": "#/$defs/action" }
|
"tap_action": {
|
||||||
|
"$ref": "#/$defs/action"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"required": ["name", "entity", "content", "type"],
|
"required": [
|
||||||
|
"name",
|
||||||
|
"entity",
|
||||||
|
"content",
|
||||||
|
"type"
|
||||||
|
],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"tap": {
|
"tap": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": { "$ref": "#/$defs/entity" },
|
"entity": {
|
||||||
"name": { "title": "Your familiar name", "type": "string" },
|
"$ref": "#/$defs/entity"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"title": "Your familiar name",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"title": "Menu item type",
|
"title": "Menu item type",
|
||||||
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
||||||
@ -54,38 +90,77 @@
|
|||||||
"title": "Schema change:",
|
"title": "Schema change:",
|
||||||
"description": "Use 'tap_action' instead to mirror Home Assistant."
|
"description": "Use 'tap_action' instead to mirror Home Assistant."
|
||||||
},
|
},
|
||||||
"tap_action": { "$ref": "#/$defs/action" }
|
"tap_action": {
|
||||||
|
"$ref": "#/$defs/action"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{ "required": ["entity", "name", "type", "service"] },
|
{
|
||||||
{ "required": ["entity", "name", "type", "tap_action"] }
|
"required": [
|
||||||
|
"entity",
|
||||||
|
"name",
|
||||||
|
"type",
|
||||||
|
"service"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"required": [
|
||||||
|
"entity",
|
||||||
|
"name",
|
||||||
|
"type",
|
||||||
|
"tap_action"
|
||||||
|
]
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"menu": {
|
"menu": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"entity": { "$ref": "#/$defs/entity" },
|
"entity": {
|
||||||
"name": { "title": "Your familiar name", "type": "string" },
|
"$ref": "#/$defs/entity"
|
||||||
"title": { "type": "string" },
|
},
|
||||||
|
"name": {
|
||||||
|
"title": "Your familiar name",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"title": "Menu item type",
|
"title": "Menu item type",
|
||||||
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
||||||
"const": "group"
|
"const": "group"
|
||||||
},
|
},
|
||||||
"items": { "$ref": "#/$defs/items" }
|
"items": {
|
||||||
|
"$ref": "#/$defs/items"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"required": ["entity", "name", "title", "type", "items"],
|
"required": [
|
||||||
|
"entity",
|
||||||
|
"name",
|
||||||
|
"title",
|
||||||
|
"type",
|
||||||
|
"items"
|
||||||
|
],
|
||||||
"additionalProperties": false
|
"additionalProperties": false
|
||||||
},
|
},
|
||||||
"items": {
|
"items": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": {
|
"items": {
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{ "$ref": "#/$defs/toggle" },
|
{
|
||||||
{ "$ref": "#/$defs/template" },
|
"$ref": "#/$defs/toggle"
|
||||||
{ "$ref": "#/$defs/tap" },
|
},
|
||||||
{ "$ref": "#/$defs/menu" }
|
{
|
||||||
|
"$ref": "#/$defs/template"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/$defs/tap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/$defs/menu"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -99,14 +174,18 @@
|
|||||||
"description": "'confirm' field is optional.",
|
"description": "'confirm' field is optional.",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"service": { "$ref": "#/$defs/entity" },
|
"service": {
|
||||||
|
"$ref": "#/$defs/entity"
|
||||||
|
},
|
||||||
"confirm": {
|
"confirm": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
"description": "Confirm the action before execution as a precaution."
|
"description": "Confirm the action before execution as a precaution."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": ["service"]
|
"required": [
|
||||||
|
"service"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user