diff --git a/src/panels/lovelace/cards/hui-gauge-card.ts b/src/panels/lovelace/cards/hui-gauge-card.ts index d4e0c2aacc..4370516653 100644 --- a/src/panels/lovelace/cards/hui-gauge-card.ts +++ b/src/panels/lovelace/cards/hui-gauge-card.ts @@ -23,7 +23,7 @@ import type { HomeAssistant } from "../../../types"; import { actionHandler } from "../common/directives/action-handler-directive"; import { findEntities } from "../common/find-entities"; import { handleAction } from "../common/handle-action"; -import { hasAction } from "../common/has-action"; +import { hasAction, hasAnyAction } from "../common/has-action"; import { hasConfigOrEntityChanged } from "../common/has-changed"; import { createEntityNotFoundWarning } from "../components/hui-warning"; import type { LovelaceCard, LovelaceCardEditor } from "../types"; @@ -128,24 +128,20 @@ class HuiGaugeCard extends LitElement implements LovelaceCard { const name = this._config.name ?? computeStateName(stateObj); - const hasAnyAction = - !this._config.tap_action || - hasAction(this._config.tap_action) || - hasAction(this._config.hold_action) || - hasAction(this._config.double_tap_action); - // Use `stateObj.state` as value to keep formatting (e.g trailing zeros) // for consistent value display across gauge, entity, entity-row, etc. return html` ${!this.hideName ? html`
${weatherStateIcon || html`