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

View File

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

View File

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