Skip to content

Status Badge

Andrew Blackburn edited this page Aug 25, 2026 · 4 revisions

Status Badge

Orbit Status Badge is an entity-compatible Home Assistant badge with Orbit colours, icons, area/domain counts, active-entity controls, and live Home Assistant templates.

Status Badge was added in Orbit Cards 1.1.0.

type: custom:orbit-status-badge
entity: binary_sensor.front_door_contact_sensor

It can be used anywhere Home Assistant accepts badges, including dashboard badge rows and Heading card badges. Entity is the default state, so an existing Entity badge can usually be converted by changing only its type.

Home Assistant exposes two badge types: Badge (LovelaceBadge) and Heading badge (LovelaceHeadingBadge). These placement types are separate from Orbit's Header and Badge display modes described below.

Badge

Light theme Dark theme
Orbit Status Badge using the Home Assistant Badge type in the light theme Orbit Status Badge using the Home Assistant Badge type in the dark theme

Heading Badge

Light theme Dark theme
Orbit Status Badge using the Home Assistant Heading badge type in the light theme Orbit Status Badge using the Home Assistant Heading badge type in the dark theme

The example above combines Area Count and Entity-style status badges in a Home Assistant Heading card.

Orbit Display Modes

Mode Use for
Header A normal Home Assistant badge with optional icon, state, and name. This is the default.
Badge A circular icon-only badge for card overlays, especially inside an Orbit Deck Card.

Badge mode writes:

display_style: badge

Set its background with card_color. Badge mode can be always visible, follow an entity's active state, or use active/inactive templates to control visibility and styling.

Entity State

Entity is the default Header state:

type: custom:orbit-status-badge
entity: lock.front_door

Native Entity badge options are supported, including entity, name, icon, color, show_name, show_state, show_icon, show_entity_picture, state_content, time_format, and tap/hold/double-tap actions.

Entity badges open more-info on tap by default. The editor's Displayed elements and State content controls use Home Assistant's native selectors.

Area Count

Area Count counts active entities of a selected domain in an area:

type: custom:orbit-status-badge
state_source: area_count
area: landing
domain: light

state_source: area_count is required for Area Count badges.

Supported domains include lights, switches, fans, covers, locks, media players, climate entities, and binary sensors.

Switches and binary sensors require at least one device-class selection so semantically different entities are not counted together. Select multiple device classes in the editor to combine related types in one count:

# Sockets
domain: switch
device_class: outlet

# Motion sensors
domain: binary_sensor
device_class: motion

# Motion and occupancy sensors combined
domain: binary_sensor
device_class:
  - motion
  - occupancy

When one device class is selected, device_class is stored as a string. Multiple selections are stored as a list, and an entity is included when it matches any selected class.

Lights do not need a device-class filter. Area Count can also be placed inside a Heading card:

type: heading
heading: Room Trends
icon: mdi:chart-line
badges:
  - type: custom:orbit-status-badge
    state_source: area_count
    area: landing
    domain: light

Hide Filters

Entities hidden in Home Assistant are excluded from Area Count by default. The editor's Hide control can also exclude entities carrying selected Home Assistant labels:

hide:
  - hidden
  - label: maintenance
  - label: diagnostic

Remove hidden in the editor to include Home Assistant-hidden entities. To explicitly apply no hide filters, use:

hide: []

Active Entities Dialog

Area Count badges open Active entities on tap by default:

Light theme Dark theme
Orbit Status Badge Active entities dialog using the light theme Orbit Status Badge Active entities dialog using the dark theme

The dialog:

  • sorts active entities by their localized display name;
  • shows each entity's current state and how long it has been active;
  • opens more-info when an entity's details are selected;
  • offers individual off, close, or lock controls when supported;
  • offers a group control when at least two entities share the same supported service.

The supported direct controls are lights, switches, fans, media players, and climate entities (turn_off), covers (close_cover), and locks (lock).

To replace the default dialog action, configure a normal tap_action.

Template State

Template state uses Home Assistant's native Jinja renderer. The result updates automatically when referenced entities change.

type: custom:orbit-status-badge
state_source: template
name: Net power
state_template: >-
  {{ (states('sensor.consumer_unit_power') | float(0)
      - states('sensor.boiler_power') | float(0)) | round(2) }} kW
active_template: >-
  {{ (states('sensor.consumer_unit_power') | float(0)
      - states('sensor.boiler_power') | float(0)) > 50 }}
name_template: >-
  {{ 'High usage' if states('sensor.consumer_unit_power') | float(0) > 50
     else 'Net power' }}

The templates have separate jobs:

  1. state_template supplies the displayed value.
  2. active_template controls active/inactive colour and icon selection.
  3. name_template supplies a live Template source for the composed Name picker.

When active_template is omitted, numeric zero and common off values are inactive; non-zero numbers and other rendered values are active. The Template name source remains Not configured until name_template is set.

Badge Mode Visibility

Badge mode always includes an optional Entity picker. The selected entity supplies native icon, colour, name, entity picture, and action context even when visibility is set to Always or Template.

Always-visible Badge mode:

type: custom:orbit-status-badge
display_style: badge
entity: light.kitchen
card_color: primary-color

Show Badge mode only while the entity is active:

type: custom:orbit-status-badge
display_style: badge
card_visibility: state
entity: binary_sensor.front_door

Template visibility supports separate active and inactive conditions:

type: custom:orbit-status-badge
display_style: badge
card_visibility: template
state_source: template
entity: sensor.consumer_unit_power
active_template: >-
  {{ states('sensor.consumer_unit_power') | float(0) > 50 }}
inactive_template: >-
  {{ states('sensor.consumer_unit_power') | float(0) <= 50 }}

A truthy active_template shows active styling. A truthy inactive_template shows inactive styling. The badge is hidden when neither is truthy, and active takes priority when both are truthy.

Badge mode is icon only, so display and name templates are not used.

Colours And Icons

The default State colour option follows Home Assistant state colours. For an Entity badge, Orbit resolves the entity's exact state, domain, and device class before using Home Assistant's domain and global active/inactive fallbacks. Lights also use their current RGB colour when available.

accent_on_color: amber
accent_off_color: grey
icon_source: custom
icon: mdi:door
icon_on: mdi:door-open
icon_off: mdi:door-closed

Badge mode uses card_color for its background. MDI, bundled orbit: icons, and local image/SVG icons are supported. See Shared Concepts for colour formats and icon paths.

Interactions

Default tap actions depend on the state source:

State Default tap action
Entity more-info
Area Count active-entities
Template none

All state types support tap, hold, and double-tap actions:

tap_action:
  action: navigate
  navigation_path: /dashboard-security
hold_action:
  action: more-info
double_tap_action:
  action: none

Options

Option Description
display_style Omit for Header mode; use badge for compact icon-only mode.
state_source entity, area_count, or template. Entity is the default.
entity Header Entity state, or Badge mode icon/colour/name/action context and State visibility source.
area, domain, device_class Area Count filters. One or more device classes are required for switches and binary sensors; use a string or list.
hide Area Count exclusions. Supports hidden and { label: label_id } entries. Hidden entities are excluded by default.
state_template Native Jinja template for the displayed Template-state value.
active_template Native Jinja template for active styling or Badge mode active visibility.
inactive_template Badge mode native Jinja template for inactive visibility and styling.
name_template Native Jinja template exposed to the composed Name picker.
card_visibility Badge mode only: omit for always, or use state or template.
card_color Badge mode background colour.
name, state_content Native name and state-content configuration.
show_name, show_state, show_icon, show_entity_picture Header-mode displayed elements.
time_format Native time formatting option.
accent_on_color, accent_off_color Active and inactive icon colours.
icon_source, icon, icon_on, icon_off Default/custom and state-specific icons.
tap_action, hold_action, double_tap_action Badge interactions. Area Count supports active-entities.

Clone this wiki locally