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)
yaml
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.
yaml
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.
To make a tab's tap run an action (e.g. navigate) instead of opening it, see Navigation & action tabs.
Supported actions
All the usual HA actions: perform-action, 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'sentity. - Configurable in the visual editor via the native action picker (Long-press action).