mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Developer tools action fixes (#24876)
This commit is contained in:
parent
a23f57256c
commit
cd39e2d0f2
@ -511,7 +511,20 @@ class HaPanelDevAction extends LitElement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this._yamlValid = true;
|
this._yamlValid = true;
|
||||||
this._serviceDataChanged(ev);
|
|
||||||
|
if (typeof ev.detail.value !== "object") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this._serviceData?.action !== ev.detail.value.action) {
|
||||||
|
this._error = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._serviceData = migrateAutomationAction(
|
||||||
|
ev.detail.value
|
||||||
|
) as ServiceAction;
|
||||||
|
|
||||||
|
this._checkUiSupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
private _checkUiSupported() {
|
private _checkUiSupported() {
|
||||||
@ -547,18 +560,18 @@ class HaPanelDevAction extends LitElement {
|
|||||||
if (this._serviceData?.action !== ev.detail.value.action) {
|
if (this._serviceData?.action !== ev.detail.value.action) {
|
||||||
this._error = undefined;
|
this._error = undefined;
|
||||||
}
|
}
|
||||||
this._serviceData = migrateAutomationAction(
|
this._serviceData = ev.detail.value;
|
||||||
ev.detail.value
|
|
||||||
) as ServiceAction;
|
|
||||||
this._checkUiSupported();
|
this._checkUiSupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
private _serviceChanged(ev) {
|
private _serviceChanged(ev) {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
this._serviceData = { action: ev.detail.value || "", data: {} };
|
if (ev.detail.value) {
|
||||||
|
this._serviceData = { action: ev.detail.value, data: {} };
|
||||||
|
this._yamlEditor?.setValue(this._serviceData);
|
||||||
|
}
|
||||||
this._response = undefined;
|
this._response = undefined;
|
||||||
this._error = undefined;
|
this._error = undefined;
|
||||||
this._yamlEditor?.setValue(this._serviceData);
|
|
||||||
this._checkUiSupported();
|
this._checkUiSupported();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user