Add description to automation editor (#13603)

This commit is contained in:
Bram Kragten 2022-09-05 19:00:54 +02:00 committed by GitHub
parent 3c289deb21
commit f3449c4d9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 2 deletions

View File

@ -64,6 +64,9 @@ export class HaBlueprintAutomationEditor extends LitElement {
</ha-alert> </ha-alert>
` `
: ""} : ""}
${this.config.description
? html`<p class="description">${this.config.description}</p>`
: ""}
<ha-card <ha-card
outlined outlined
class="blueprint" class="blueprint"
@ -238,6 +241,9 @@ export class HaBlueprintAutomationEditor extends LitElement {
p { p {
margin-bottom: 0; margin-bottom: 0;
} }
.description {
margin-bottom: 16px;
}
ha-settings-row { ha-settings-row {
--paper-time-input-justify-content: flex-end; --paper-time-input-justify-content: flex-end;
--settings-row-content-width: 100%; --settings-row-content-width: 100%;

View File

@ -627,7 +627,7 @@ export class HaAutomationEditor extends KeyboardShortcutMixin(LitElement) {
private async _saveAutomation(): Promise<void> { private async _saveAutomation(): Promise<void> {
const id = this.automationId || String(Date.now()); const id = this.automationId || String(Date.now());
if (!this._config!.alias) { if (!this.automationId) {
await this._promptAutomationAlias(); await this._promptAutomationAlias();
if (!this._config!.alias) { if (!this._config!.alias) {
showAlertDialog(this, { showAlertDialog(this, {

View File

@ -73,6 +73,9 @@ export class HaManualAutomationEditor extends LitElement {
</ha-alert> </ha-alert>
` `
: ""} : ""}
${this.config.description
? html`<p class="description">${this.config.description}</p>`
: ""}
<div class="header"> <div class="header">
<h2 id="triggers-heading" class="name"> <h2 id="triggers-heading" class="name">
${this.hass.localize( ${this.hass.localize(
@ -215,7 +218,9 @@ export class HaManualAutomationEditor extends LitElement {
.link-button-row { .link-button-row {
padding: 14px; padding: 14px;
} }
.description {
margin: 0;
}
p { p {
margin-bottom: 0; margin-bottom: 0;
} }