From 92358b4859419497aa328bde91d13ff8d6694051 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Mon, 21 Aug 2023 06:51:33 -0700 Subject: [PATCH] Don't show pointer for glance entity when there is no action (#17625) --- src/panels/lovelace/cards/hui-glance-card.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/panels/lovelace/cards/hui-glance-card.ts b/src/panels/lovelace/cards/hui-glance-card.ts index 7e1bbedb0c..081f930a15 100644 --- a/src/panels/lovelace/cards/hui-glance-card.ts +++ b/src/panels/lovelace/cards/hui-glance-card.ts @@ -206,10 +206,12 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard { display: flex; flex-direction: column; align-items: center; - cursor: pointer; margin-bottom: 12px; width: var(--glance-column-width, 20%); } + .entity.action { + cursor: pointer; + } .entity:focus { outline: none; background: var(--divider-color); @@ -282,9 +284,15 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard { const name = entityConf.name ?? computeStateName(stateObj); + const hasAnyAction = + !entityConf.tap_action || + hasAction(entityConf.tap_action) || + hasAction(entityConf.hold_action) || + hasAction(entityConf.double_tap_action); + return html`