From 968c0de1411065a44b5a441b9120efc45b2aa08f Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 21 Aug 2024 20:13:09 +0200 Subject: [PATCH] Fix migration from call-service to perform-action (#21746) --- src/panels/lovelace/components/hui-action-editor.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/panels/lovelace/components/hui-action-editor.ts b/src/panels/lovelace/components/hui-action-editor.ts index e1cca9a4d4..dad65137ad 100644 --- a/src/panels/lovelace/components/hui-action-editor.ts +++ b/src/panels/lovelace/components/hui-action-editor.ts @@ -226,8 +226,15 @@ export class HuiActionEditor extends LitElement { if (!this.hass) { return; } + let action = this.config?.action; + + if (action === "call-service") { + action = "perform-action"; + } + const value = ev.target.value; - if (this.config?.action === value) { + + if (action === value) { return; } if (value === "default") { @@ -292,6 +299,7 @@ export class HuiActionEditor extends LitElement { ev.stopPropagation(); const value = { ...this.config!, + action: "perform-action", perform_action: ev.detail.value.action || "", data: ev.detail.value.data, target: ev.detail.value.target || {},