Skip to content

Commit c7f3331

Browse files
jpbedebramkragten
authored andcommitted
Do not show AI suggestion button when no inputs in save dialog (#26357)
1 parent c32444b commit c7f3331

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/panels/config/automation/automation-save-dialog/dialog-automation-save.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,14 @@ class DialogAutomationSave extends LitElement implements HassDialog {
260260
.path=${mdiClose}
261261
></ha-icon-button>
262262
<span slot="title">${this._params.title || title}</span>
263-
<ha-suggest-with-ai-button
264-
slot="actionItems"
265-
.hass=${this.hass}
266-
.generateTask=${this._generateTask}
267-
@suggestion=${this._handleSuggestion}
268-
></ha-suggest-with-ai-button>
263+
${this._params.hideInputs
264+
? nothing
265+
: html` <ha-suggest-with-ai-button
266+
slot="actionItems"
267+
.hass=${this.hass}
268+
.generateTask=${this._generateTask}
269+
@suggestion=${this._handleSuggestion}
270+
></ha-suggest-with-ai-button>`}
269271
</ha-dialog-header>
270272
${this._error
271273
? html`<ha-alert alert-type="error"

0 commit comments

Comments
 (0)