Dashboards

Count badge

A badge with the number of a count helper, like how many lights are on. Gone at zero. Select it to see which lights are on, and open any of them.

The count badge puts the number of a count helper on your dashboard: how many lights are on, how many windows are open, how many things are unavailable. When nothing counts, the badge is gone, so it only takes room when there is something to see.

Select it, and it lists what counts right now: every light that is on, with its state. Select one to open it.

It needs Spook on your dashboards switched on, and a count helper to show.

The count badge for the lights that are on, showing 3, next to Home Assistant's own badges, with the list of the three lights opened under it.

Adding it to a dashboard

  1. Open the dashboard, and edit it.
  2. Select Add badge, and search for Count (Spook).
  3. Pick the count helper. Only count helpers are offered.
  4. Select Save.
Or start from the helper: add a badge, pick the sensor of your count helper, and the count badge is offered right there.

What it shows

The name and the icon of the count helper, and the count. Give the badge a name or an icon of its own in the editor, and those win.
  • At zero, the badge is gone. Switch on Show at zero to keep it, with a 0.
  • While Home Assistant starts, the count helper has no count yet, so the badge is gone until it has one.
  • Unavailable: the badge stays, and says so. Something is off with the helper.
  • While you edit the dashboard, the badge is always there, at zero too, so you can find it.

What counts

Select the badge, and a list opens with every entity that counts right now, by name, with its state. Select one to open its more info dialog. Details at the bottom opens the one of the count helper itself, with the history of the count.The list keeps up while it is open: a light that goes off drops out. When the count drops to zero and the badge goes, the list closes with it.

Options

OptionWhat it does
EntityThe count helper the badge shows.
NameThe name of the badge. The helper's own if left empty.
IconThe icon of the badge. The helper's own if left empty.
Show at zeroKeep the badge when nothing counts, instead of it being gone.

In YAML

type: custom:spook-count-badge
entity: sensor.living_room_lights_on
name: Lights on
icon: mdi:lightbulb-group
show_zero: true
KeyValuesDefault
entityA count helperRequired
nameAny textThe helper's name
iconAn iconThe helper's icon
show_zerotrue or falsefalse: gone at zero