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}
></ha-icon-button>
<span slot="title">${this._params.title || title}</span>
<ha-suggest-with-ai-button
slot="actionItems"
.hass=${this.hass}
.generateTask=${this._generateTask}
@suggestion=${this._handleSuggestion}
></ha-suggest-with-ai-button>
${this._params.hideInputs
? nothing
: html` <ha-suggest-with-ai-button
slot="actionItems"
.hass=${this.hass}
.generateTask=${this._generateTask}
@suggestion=${this._handleSuggestion}
></ha-suggest-with-ai-button>`}
</ha-dialog-header>
${this._error
? html`<ha-alert alert-type="error"