${this.hass.localize( "ui.panel.developer-tools.tabs.templates.description" @@ -126,123 +121,143 @@ class HaPanelDevTemplate extends LitElement { > -
- ${this.hass.localize( - "ui.panel.developer-tools.tabs.templates.editor" - )} -
-diff --git a/src/panels/developer-tools/template/developer-tools-template.ts b/src/panels/developer-tools/template/developer-tools-template.ts index e4162d3077..b80fdd3d5d 100644 --- a/src/panels/developer-tools/template/developer-tools-template.ts +++ b/src/panels/developer-tools/template/developer-tools-template.ts @@ -88,13 +88,8 @@ class HaPanelDevTemplate extends LitElement { : "dict" : type; return html` -
${this.hass.localize( "ui.panel.developer-tools.tabs.templates.description" @@ -126,123 +121,143 @@ class HaPanelDevTemplate extends LitElement { > -
- ${this.hass.localize( - "ui.panel.developer-tools.tabs.templates.editor" - )} -
-${type === "object" - ? JSON.stringify(this._templateResult.result, null, 2) - : this._templateResult.result}- ${this._templateResult.listeners.time - ? html` -
- ${this.hass.localize( - "ui.panel.developer-tools.tabs.templates.time" - )} -
- ` - : ""} - ${!this._templateResult.listeners - ? nothing - : this._templateResult.listeners.all +${type === "object" + ? JSON.stringify(this._templateResult.result, null, 2) + : this._templateResult.result}+ ${this._templateResult.listeners.time ? html` -
+
${this.hass.localize( - "ui.panel.developer-tools.tabs.templates.all_listeners" + "ui.panel.developer-tools.tabs.templates.time" )}
` - : this._templateResult.listeners.domains.length || - this._templateResult.listeners.entities.length + : ""} + ${!this._templateResult.listeners + ? nothing + : this._templateResult.listeners.all ? html` -+
${this.hass.localize( - "ui.panel.developer-tools.tabs.templates.listeners" + "ui.panel.developer-tools.tabs.templates.all_listeners" )}
-+ ${this.hass.localize( + "ui.panel.developer-tools.tabs.templates.listeners" + )} +
+