) => {
switch (schema.name) {
case "theme":
+ case "tap_action":
+ case "hold_action":
return `${this.hass!.localize(
- "ui.panel.lovelace.editor.card.generic.theme"
+ `ui.panel.lovelace.editor.card.generic.${schema.name}`
)} (${this.hass!.localize(
"ui.panel.lovelace.editor.card.config.optional"
)})`;
diff --git a/src/panels/lovelace/editor/config-elements/hui-picture-glance-card-editor.ts b/src/panels/lovelace/editor/config-elements/hui-picture-glance-card-editor.ts
index aa7340e134..d09724610f 100644
--- a/src/panels/lovelace/editor/config-elements/hui-picture-glance-card-editor.ts
+++ b/src/panels/lovelace/editor/config-elements/hui-picture-glance-card-editor.ts
@@ -7,7 +7,6 @@ import type { SchemaUnion } from "../../../../components/ha-form/types";
import type { ActionConfig } from "../../../../data/lovelace";
import type { HomeAssistant } from "../../../../types";
import type { PictureGlanceCardConfig } from "../../cards/types";
-import "../../components/hui-action-editor";
import "../../components/hui-entity-editor";
import type { EntityConfig } from "../../entity-rows/types";
import type { LovelaceCardEditor } from "../../types";
@@ -15,7 +14,6 @@ import { processEditorEntities } from "../process-editor-entities";
import { actionConfigStruct } from "../structs/action-struct";
import { baseLovelaceCardConfig } from "../structs/base-card-struct";
import { entitiesConfigStruct } from "../structs/entities-struct";
-import type { EditorTarget } from "../types";
import { configElementStyle } from "./config-elements-style";
const cardConfigStruct = assign(
@@ -34,8 +32,6 @@ const cardConfigStruct = assign(
})
);
-const actions = ["more-info", "toggle", "navigate", "call-service", "none"];
-
const SCHEMA = [
{ name: "title", selector: { text: {} } },
{ name: "image", selector: { text: {} } },
@@ -53,6 +49,14 @@ const SCHEMA = [
},
{ name: "entity", selector: { entity: {} } },
{ name: "theme", selector: { theme: {} } },
+ {
+ name: "tap_action",
+ selector: { "ui-action": {} },
+ },
+ {
+ name: "hold_action",
+ selector: { "ui-action": {} },
+ },
] as const;
@customElement("hui-picture-glance-card-editor")
@@ -96,26 +100,6 @@ export class HuiPictureGlanceCardEditor
@value-changed=${this._valueChanged}
>
-
-
) => {
switch (schema.name) {
case "theme":
+ case "tap_action":
+ case "hold_action":
return `${this.hass!.localize(
- "ui.panel.lovelace.editor.card.generic.theme"
+ `ui.panel.lovelace.editor.card.generic.${schema.name}`
)} (${this.hass!.localize(
"ui.panel.lovelace.editor.card.config.optional"
)})`;