Fix a case where developer-tools/action can get stuck in an error loop (#22334)

This commit is contained in:
karwosts 2024-10-11 11:37:49 -07:00 committed by GitHub
parent f9ff938775
commit 6cfda78aa1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -68,6 +68,16 @@ class HaPanelDevAction extends LitElement {
@query("#yaml-editor") private _yamlEditor?: HaYamlEditor;
protected willUpdate() {
if (
!this.hasUpdated &&
this._serviceData?.action &&
typeof this._serviceData.action !== "string"
) {
this._serviceData.action = "";
}
}
protected firstUpdated(params) {
super.firstUpdated(params);
this.hass.loadBackendTranslation("services");