mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Use defined response_variable for json copy_to_clipboard button (#21705)
This commit is contained in:
parent
3e1ea8d236
commit
16e84296da
@ -308,7 +308,7 @@ class HaPanelDevAction extends LitElement {
|
|||||||
|
|
||||||
private async _copyTemplate(): Promise<void> {
|
private async _copyTemplate(): Promise<void> {
|
||||||
await copyToClipboard(
|
await copyToClipboard(
|
||||||
`{% set action_response = ${JSON.stringify(this._response)} %}`
|
`{% set ${this._serviceData?.response_variable || "action_response"} = ${JSON.stringify(this._response)} %}`
|
||||||
);
|
);
|
||||||
showToast(this, {
|
showToast(this, {
|
||||||
message: this.hass.localize("ui.common.copied_clipboard"),
|
message: this.hass.localize("ui.common.copied_clipboard"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user