From 6cfda78aa185cc3e7c531c1c9476fe817a3e55e0 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:37:49 -0700 Subject: [PATCH] Fix a case where developer-tools/action can get stuck in an error loop (#22334) --- .../developer-tools/action/developer-tools-action.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/panels/developer-tools/action/developer-tools-action.ts b/src/panels/developer-tools/action/developer-tools-action.ts index f0f6dc78b1..23129a3c18 100644 --- a/src/panels/developer-tools/action/developer-tools-action.ts +++ b/src/panels/developer-tools/action/developer-tools-action.ts @@ -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");