From 16e84296dad4dc7705f192b563b12827b3000247 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Thu, 15 Aug 2024 21:40:56 -0700 Subject: [PATCH] Use defined response_variable for json copy_to_clipboard button (#21705) --- src/panels/developer-tools/action/developer-tools-action.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panels/developer-tools/action/developer-tools-action.ts b/src/panels/developer-tools/action/developer-tools-action.ts index ccd8b947dd..40c8876501 100644 --- a/src/panels/developer-tools/action/developer-tools-action.ts +++ b/src/panels/developer-tools/action/developer-tools-action.ts @@ -308,7 +308,7 @@ class HaPanelDevAction extends LitElement { private async _copyTemplate(): Promise { await copyToClipboard( - `{% set action_response = ${JSON.stringify(this._response)} %}` + `{% set ${this._serviceData?.response_variable || "action_response"} = ${JSON.stringify(this._response)} %}` ); showToast(this, { message: this.hass.localize("ui.common.copied_clipboard"),