-
Notifications
You must be signed in to change notification settings - Fork 0
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_sensorIt 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.
| Light theme | Dark theme |
|---|---|
![]() |
![]() |
The example above combines Area Count and Entity-style status badges in a Home Assistant Heading card.
| 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: badgeSet 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 is the default Header state:
type: custom:orbit-status-badge
entity: lock.front_doorNative 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 counts active entities of a selected domain in an area:
type: custom:orbit-status-badge
state_source: area_count
area: landing
domain: lightstate_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
- occupancyWhen 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: lightEntities 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: diagnosticRemove hidden in the editor to include Home Assistant-hidden entities. To explicitly apply no hide filters, use:
hide: []Area Count badges open Active entities on tap by default:
| Light theme | 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-infowhen 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 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:
-
state_templatesupplies the displayed value. -
active_templatecontrols active/inactive colour and icon selection. -
name_templatesupplies 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 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-colorShow Badge mode only while the entity is active:
type: custom:orbit-status-badge
display_style: badge
card_visibility: state
entity: binary_sensor.front_doorTemplate 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.
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-closedBadge 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.
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| 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. |



