Skip to content

Commit

Permalink
Fix migration from call-service to perform-action (#21746)
Browse files Browse the repository at this point in the history
  • Loading branch information
piitaya authored Aug 21, 2024
1 parent 77d8aff commit 968c0de
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/panels/lovelace/components/hui-action-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down Expand Up @@ -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 || {},
Expand Down

0 comments on commit 968c0de

Please sign in to comment.