Update cookcli-card.js

This commit is contained in:
TheThomaas 2026-09-16 15:38:34 +02:00
parent 8647330024
commit 990bf6fce4

33
dist/cookcli-card.js vendored
View file

@ -202,45 +202,14 @@ class CookCliCardEditor extends LitElement {
schema: [ schema: [
{ name: "label", selector: { label: {} } }, { name: "label", selector: { label: {} } },
{ name: "entity", required: true, selector: { entity: {} } }, { name: "entity", required: true, selector: { entity: {} } },
{
type: "grid",
name: "",
schema: [
{ name: "name", selector: { text: {} } },
{
name: "icon",
selector: {
icon: {},
},
context: {
icon_entity: "entity",
},
},
{
name: "attribute",
selector: {
attribute: {},
},
context: {
filter_entity: "entity",
},
},
{ name: "unit", selector: { text: {} } },
{ name: "theme", selector: { theme: {} } },
{ name: "state_color", selector: { boolean: {} } },
],
},
], ],
computeLabel: (schema) => { computeLabel: (schema) => {
if (schema.name === "icon") return "Special Icon";
return undefined; return undefined;
}, },
computeHelper: (schema) => { computeHelper: (schema) => {
switch (schema.name) { switch (schema.name) {
case "entity": case "entity":
return "This text describes the function of the entity selector"; return "This text describes the function of the entity selector";
case "unit":
return "The unit of measurement for this card";
} }
return undefined; return undefined;
}, },
@ -251,7 +220,7 @@ class CookCliCardEditor extends LitElement {
}, },
}; };
} }
/*static getConfigForm() { /*static getConfigForm() {
return { return {
schema: [ schema: [