Skip to content

Feature Hold Action

tempus2016 edited this page Jun 24, 2026 · 2 revisions

Long-press tab action

Give a tab a hold_action to run a Home Assistant action when the tab is long-pressed (~0.5 s). A normal tap still just selects the tab.

Per-tab key: hold_action (standard HA action object)

type: custom:tabdeck-card
tabs:
  - name: Sun
    icon: mdi:weather-sunny
    hold_action:
      action: more-info
      entity: sun.sun
    card: { ... }
  - name: Scenes
    icon: mdi:palette
    hold_action:
      action: navigate
      navigation_path: /lovelace/scenes
    card: { ... }

Clickable badge: badge_action

Give the tab's badge its own action — tapping the badge runs it without selecting the tab.

tabs:
  - name: Inbox
    icon: mdi:email
    badge: sensor.unread
    badge_action:
      action: navigate
      navigation_path: /lovelace/inbox
    card: { ... }

The badge shows a pointer cursor when it has an action. Configured via the Badge tap action picker in the editor.

Supported actions

All the usual HA actions: more-info, navigate, url, toggle, call-service, fire-dom-event, none.

Behaviour

  • Tap = select the tab (unchanged). Long-press = run hold_action.
  • A long-press suppresses the follow-up select, so holding doesn't also switch tabs.
  • For more-info/toggle, set the action's entity.
  • Configurable in the visual editor via the native action picker (Long-press action).

Clone this wiki locally