Skip to content
Stand with Ukraine flag

Battery level

  • Widget
  • v1.0.0
  • Aug 27, 2026
  • MIT license
  • v4.2+ | Built-in
Battery level

Displays the current battery level of the device.

Widget Type
  • Latest
Category
  • Gauges & Indicators
Use Cases
  • Smart Metering
  • Predictive Maintenance

Battery level

Displays the current battery level of a device as a battery-shaped indicator with the value rendered inside it. Ships as a built-in widget in ThingsBoard.

Default data keys

  • batteryLevel (function) — battery charge, %, 0 decimals

Default appearance

SettingDefault
LayoutVertical, solid fill
Sections4
Value shown inside the shapeYes, auto-scaled font
Widget size2.5 × 2.5 grid cells

The fill color follows the value by range:

Battery levelColor
below 25%Red
25–50%Amber
above 50%Green

How to customize

The widget has a basic configuration mode, so a datasource and the visual settings can be set without editing the advanced widget config. Available settings: layout (vertical/horizontal, solid/divided), section count, value visibility and font, value color, battery fill color (constant or range-based), battery shape color, and background.

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.