mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Fix migration from call-service to perform-action (#21746)
This commit is contained in:
parent
77d8aff1f4
commit
968c0de141
@ -226,8 +226,15 @@ export class HuiActionEditor extends LitElement {
|
|||||||
if (!this.hass) {
|
if (!this.hass) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
let action = this.config?.action;
|
||||||
|
|
||||||
|
if (action === "call-service") {
|
||||||
|
action = "perform-action";
|
||||||
|
}
|
||||||
|
|
||||||
const value = ev.target.value;
|
const value = ev.target.value;
|
||||||
if (this.config?.action === value) {
|
|
||||||
|
if (action === value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (value === "default") {
|
if (value === "default") {
|
||||||
@ -292,6 +299,7 @@ export class HuiActionEditor extends LitElement {
|
|||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
const value = {
|
const value = {
|
||||||
...this.config!,
|
...this.config!,
|
||||||
|
action: "perform-action",
|
||||||
perform_action: ev.detail.value.action || "",
|
perform_action: ev.detail.value.action || "",
|
||||||
data: ev.detail.value.data,
|
data: ev.detail.value.data,
|
||||||
target: ev.detail.value.target || {},
|
target: ev.detail.value.target || {},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user