Skip to content
Stand with Ukraine flag

Entity count

  • Widget
  • v1.0.0
  • Sep 1, 2026
  • MIT license
  • v4.2+ | Built-in
Entity count

Displays the number of entities based on the selected alias and optional filter. The number of entities refreshes periodically and not in real-time.

Widget Type
  • Latest
Category
  • Cards & Info
Use Cases
  • Smart Building
  • Smart City
  • Asset Tracking

Who it’s for

Fleet and site managers who want a headline number rather than a list — how many devices are on this site, how many assets are in this group, how many gateways match a filter. The tile answers a counting question at the top of a dashboard, above the table that shows the individual rows.

What it does

The Entity count card counts the entities an alias resolves to and prints the total with a caption and an icon. An alias returning every device on a site shows as an orange devices icon, the caption Devices, and the count beside it; adding a filter to the alias narrows what is counted without changing anything on the card.

  • The alias does the work — any entity type, any filter the alias supports, and the card counts whatever comes back.
  • Column or row layout — the caption sits above or beside the number, so the tile fits a narrow sidebar or a wide header band.
  • The icon has its own colored background, sized independently, which is what makes a row of these read as a set of counters rather than as text.
  • An optional chevron marks the tile as clickable, so a count can lead to the filtered list it summarizes.
  • Caption, value and icon each take their own font and color, and colors accept ranges — a count can turn red once it crosses a threshold.
  • The count refreshes periodically rather than in real time, so a device added this second appears at the next refresh rather than instantly.

How to set up

Data keys

The Entity count card takes no data keys — it counts entities rather than reading telemetry.

KeyRoleTypeDescription
No key is readEntity fieldWhat the card counts comes from the datasource’s entity alias and its filter. Point the alias at the entities you want counted; the card reports how many it resolves to.

Define the alias first, with whatever filter narrows it to the set you want to count, then check the number against the entity list the same alias produces elsewhere. Because the count is refreshed on a timer rather than pushed, a change to the underlying entities shows up at the next refresh.

How to customize

  • To put the caption beside the number instead of above it — set Layout to Row; Column stacks them.
  • To keep the tile proportional at any size — leave Auto scale on; turn it off to pin exact font sizes.
  • To write the caption — turn on Label and type it, then set its font and color. It defaults to Devices, which is wrong for anything else being counted.
  • To change the icon and its badge — set Icon, its size and color, then Icon background for the circle behind it, which has its own size and color.
  • To make the number react to how large it is — set Value color to a range, so an unexpectedly high or low count recolors itself.
  • To mark the tile as clickable — turn on Chevron and set its size and color, then attach a click action that opens the matching list.

Tips

  • Give each counter on a dashboard a distinct icon background color and keep the icons themselves simple. A row of counters is read by color first, and identical badges force the reader back to the captions every time.
  • Point the alias at exactly the set the caption claims. A tile captioned Active devices backed by an unfiltered alias reads as authoritative and is quietly wrong, and a count is harder to sanity-check at a glance than a list is.

Share Your Widget with the Community

Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.