From e573a726aab2cd06d9c0d4aaa0683bdfa673af62 Mon Sep 17 00:00:00 2001 From: Timothy <6560631+TimoPtr@users.noreply.github.com> Date: Fri, 5 Dec 2025 15:05:50 +0100 Subject: [PATCH] Add add to button in more info topbar for non admin users (#28365) --- src/dialogs/more-info/ha-more-info-dialog.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/dialogs/more-info/ha-more-info-dialog.ts b/src/dialogs/more-info/ha-more-info-dialog.ts index 84705d650c..bfce8235ea 100644 --- a/src/dialogs/more-info/ha-more-info-dialog.ts +++ b/src/dialogs/more-info/ha-more-info-dialog.ts @@ -302,7 +302,9 @@ export class MoreInfoDialog extends LitElement { } private _goToAddEntityTo(ev) { - if (!shouldHandleRequestSelectedEvent(ev)) return; + // Only check for request-selected events (from menu items), not regular clicks (from icon button) + if (ev.type === "request-selected" && !shouldHandleRequestSelectedEvent(ev)) + return; this._setView("add_to"); } @@ -550,7 +552,18 @@ export class MoreInfoDialog extends LitElement { : nothing} ` - : nothing} + : !__DEMO__ && this._shouldShowAddEntityTo() + ? html` + + ` + : nothing} ` : isSpecificInitialView ? html`