Do not show AI suggestion button when no inputs in save dialog (#26357)

This commit is contained in:
Jan-Philipp Benecke 2025-08-03 08:10:06 +02:00 committed by GitHub
parent bd9de0680e
commit 6022f9a77e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -260,12 +260,14 @@ class DialogAutomationSave extends LitElement implements HassDialog {
.path=${mdiClose} .path=${mdiClose}
></ha-icon-button> ></ha-icon-button>
<span slot="title">${this._params.title || title}</span> <span slot="title">${this._params.title || title}</span>
<ha-suggest-with-ai-button ${this._params.hideInputs
slot="actionItems" ? nothing
.hass=${this.hass} : html` <ha-suggest-with-ai-button
.generateTask=${this._generateTask} slot="actionItems"
@suggestion=${this._handleSuggestion} .hass=${this.hass}
></ha-suggest-with-ai-button> .generateTask=${this._generateTask}
@suggestion=${this._handleSuggestion}
></ha-suggest-with-ai-button>`}
</ha-dialog-header> </ha-dialog-header>
${this._error ${this._error
? html`<ha-alert alert-type="error" ? html`<ha-alert alert-type="error"