mirror of
https://github.com/house-of-abbey/GarminHomeAssistant.git
synced 2025-06-15 10:58:40 +00:00
Merge pull request #85 from house-of-abbey/restyled/79-confirm-on-toggle
Restyle Initial Solution
This commit is contained in:
@ -2,8 +2,12 @@
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"title": { "type": "string" },
|
||||
"items": { "$ref": "#/$defs/items" },
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"items": {
|
||||
"$ref": "#/$defs/items"
|
||||
},
|
||||
"required": ["title", "items"],
|
||||
"additionalProperties": false
|
||||
},
|
||||
@ -11,8 +15,13 @@
|
||||
"toggle": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity": { "$ref": "#/$defs/entity" },
|
||||
"name": { "title": "Your familiar name", "type": "string" },
|
||||
"entity": {
|
||||
"$ref": "#/$defs/entity"
|
||||
},
|
||||
"name": {
|
||||
"title": "Your familiar name",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"title": "Menu item type",
|
||||
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
||||
@ -21,7 +30,9 @@
|
||||
"tap_action": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"confirm": { "$ref": "#/$defs/confirm" }
|
||||
"confirm": {
|
||||
"$ref": "#/$defs/confirm"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
@ -32,15 +43,25 @@
|
||||
"template": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity": { "$ref": "#/$defs/entity" },
|
||||
"name": { "title": "Your familiar name", "type": "string" },
|
||||
"content": { "title": "What to display (template)", "type": "string" },
|
||||
"entity": {
|
||||
"$ref": "#/$defs/entity"
|
||||
},
|
||||
"name": {
|
||||
"title": "Your familiar name",
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"title": "What to display (template)",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"title": "Menu item type",
|
||||
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
||||
"const": "template"
|
||||
},
|
||||
"tap_action": { "$ref": "#/$defs/tap_action" }
|
||||
"tap_action": {
|
||||
"$ref": "#/$defs/tap_action"
|
||||
}
|
||||
},
|
||||
"required": ["name", "content", "type"],
|
||||
"additionalProperties": false
|
||||
@ -48,8 +69,13 @@
|
||||
"tap": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"entity": { "$ref": "#/$defs/entity" },
|
||||
"name": { "title": "Your familiar name", "type": "string" },
|
||||
"entity": {
|
||||
"$ref": "#/$defs/entity"
|
||||
},
|
||||
"name": {
|
||||
"title": "Your familiar name",
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"title": "Menu item type",
|
||||
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
||||
@ -61,11 +87,17 @@
|
||||
"title": "Schema change:",
|
||||
"description": "Use 'tap_action' instead to mirror Home Assistant."
|
||||
},
|
||||
"tap_action": { "$ref": "#/$defs/tap_action" }
|
||||
"tap_action": {
|
||||
"$ref": "#/$defs/tap_action"
|
||||
}
|
||||
},
|
||||
"oneOf": [
|
||||
{ "required": ["name", "type", "service"] },
|
||||
{ "required": ["name", "type", "tap_action"] }
|
||||
{
|
||||
"required": ["name", "type", "service"]
|
||||
},
|
||||
{
|
||||
"required": ["name", "type", "tap_action"]
|
||||
}
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
@ -78,14 +110,21 @@
|
||||
"title": "Schema change:",
|
||||
"description": "'entity' is no longer necessary and should be removed."
|
||||
},
|
||||
"name": { "title": "Your familiar name", "type": "string" },
|
||||
"title": { "type": "string" },
|
||||
"name": {
|
||||
"title": "Your familiar name",
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"title": "Menu item type",
|
||||
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
|
||||
"const": "group"
|
||||
},
|
||||
"items": { "$ref": "#/$defs/items" }
|
||||
"items": {
|
||||
"$ref": "#/$defs/items"
|
||||
}
|
||||
},
|
||||
"required": ["name", "title", "type", "items"],
|
||||
"additionalProperties": false
|
||||
@ -94,10 +133,18 @@
|
||||
"type": "array",
|
||||
"items": {
|
||||
"oneOf": [
|
||||
{ "$ref": "#/$defs/toggle" },
|
||||
{ "$ref": "#/$defs/template" },
|
||||
{ "$ref": "#/$defs/tap" },
|
||||
{ "$ref": "#/$defs/group" }
|
||||
{
|
||||
"$ref": "#/$defs/toggle"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/template"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/tap"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/group"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
@ -111,8 +158,12 @@
|
||||
"description": "'confirm' field is optional.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"service": { "$ref": "#/$defs/entity" },
|
||||
"confirm": { "$ref": "#/$defs/confirm" },
|
||||
"service": {
|
||||
"$ref": "#/$defs/entity"
|
||||
},
|
||||
"confirm": {
|
||||
"$ref": "#/$defs/confirm"
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"description": "The object containing the parameters and their values to be passed to the entity. No schema checking can be done here, you are on your own! On application crash, remove the parameters."
|
||||
|
Reference in New Issue
Block a user