Added templates to group items

This commit is contained in:
Philip Abbey
2024-08-24 18:31:47 +01:00
parent f2fb7f65a0
commit ea32d71a2b
9 changed files with 251 additions and 163 deletions

View File

@ -22,14 +22,16 @@
"$ref": "#/$defs/entity"
},
"name": {
"title": "Your familiar name",
"type": "string"
"$ref": "#/$defs/name"
},
"type": {
"title": "Menu item type",
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
"$ref": "#/$defs/type",
"const": "toggle"
},
"content": {
"$ref": "#/$defs/content",
"description": "Optional in a toggle."
},
"tap_action": {
"type": "object",
"properties": {
@ -55,16 +57,13 @@
"description": "Use 'tap_action' instead to mirror Home Assistant."
},
"name": {
"title": "Your familiar name",
"type": "string"
"$ref": "#/$defs/name"
},
"content": {
"title": "What to display (template)",
"type": "string"
"$ref": "#/$defs/content"
},
"type": {
"title": "Menu item type",
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
"$ref": "#/$defs/type",
"const": "template"
}
},
@ -78,16 +77,13 @@
"$ref": "#/$defs/entity"
},
"name": {
"title": "Your familiar name",
"type": "string"
"$ref": "#/$defs/name"
},
"content": {
"title": "What to display (template)",
"type": "string"
"$ref": "#/$defs/content"
},
"type": {
"title": "Menu item type",
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
"$ref": "#/$defs/type",
"const": "template"
},
"tap_action": {
@ -106,12 +102,10 @@
"$ref": "#/$defs/entity"
},
"name": {
"title": "Your familiar name",
"type": "string"
"$ref": "#/$defs/name"
},
"type": {
"title": "Menu item type",
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
"$ref": "#/$defs/type",
"const": "tap"
},
"service": {
@ -153,10 +147,13 @@
"type": "string"
},
"type": {
"title": "Menu item type",
"description": "One of 'tap', 'template', 'toggle' or 'group'.",
"$ref": "#/$defs/type",
"const": "group"
},
"content": {
"$ref": "#/$defs/content",
"description": "Optional in a group."
},
"items": {
"$ref": "#/$defs/items"
}
@ -164,6 +161,10 @@
"required": ["name", "title", "type", "items"],
"additionalProperties": false
},
"type": {
"title": "Menu item type",
"description": "One of 'tap', 'template', 'toggle' or 'group'."
},
"items": {
"type": "array",
"maxItems": 16,
@ -184,6 +185,10 @@
]
}
},
"name": {
"title": "Your familiar name",
"type": "string"
},
"entity": {
"type": "string",
"title": "Home Assistant entity name",
@ -213,6 +218,10 @@
},
"required": ["service"]
},
"content": {
"title": "Jinja2 template defining the text to display.",
"type": "string"
},
"confirm": {
"type": "boolean",
"default": false,