-
Notifications
You must be signed in to change notification settings - Fork 0
Feature Conditional Default
tempus2016 edited this page Jun 24, 2026
·
1 revision
Pick which tab opens first based on the current state — e.g. open the Guest tab when guest mode is on, otherwise the normal home tab.
Per-tab key: default_if — a list of conditions (same format as visibility)
type: custom:tabdeck-card
default_tab: Home # fallback when nothing matches
tabs:
- name: Home
card: { ... }
- name: Guest
default_if:
- condition: state
entity: input_boolean.guest_mode
state: "on"
card: { ... }- On load, the first tab (in order) whose
default_ifconditions all pass becomes the starting tab. - If none match, the normal
default_tabis used. - A remembered selection (
remember) still wins overdefault_if. -
default_ifis evaluated at first paint, so use synchronous conditions:state,numeric_state,screen,time,user, andand/or/notgroups. Template conditions may not have resolved yet on the very first render and aren't reliable here. - Configured in YAML.
Concepts
Features