Skip to content
Stand with Ukraine flag

Power and Energy Card

  • Widget
  • 15 installs
  • v1.0.0
  • Aug 18, 2026
  • MIT license
  • v4.2+
Power and Energy Card

Shows live power as Import, Export, or Idle by its sign, plus imported energy, exported energy, and power factor when those keys are bound.

Widget Type
  • Latest
Category
  • Cards & Info
Use Cases
  • Smart Building
  • Smart City
  • Solar Monitoring

Who it’s for

Anyone whose meter can point in two directions needs one card that answers “am I buying power from the grid right now, or sending it back?” A rooftop solar owner watches that answer move through the day. An infrastructure engineer checks a server rack’s draw against the breaker’s limit before adding another server. An energy manager compares kWh per shift to catch a night shift quietly drawing 15% more power for the same output. An EV charging operator checks how much a session delivered for billing, and a mall’s accounting team reads a tenant’s monthly consumption off the same tile design.

What it does

A rooftop array reading -3.4 kW at midday shows Export in green — the negative sign is a state, not an error. Once the panels’ output drops below the building’s own draw in the evening, the same reading crosses back through zero and the card switches to Import on its own, with nothing to reconfigure.

  • Power shows as Import, Export, or Idle — each with its own color and icon, so a negative reading never looks like a fault or gets silently turned positive
  • Imported energy, exported energy, and power factor each get their own tile when bound, styled alike, so none reads as a lesser afterthought next to the others
  • No tariff or cost math happens anywhere on this card — it shows the readings, not a bill
  • Text, icons, and spacing all grow or shrink together to fit the card, so there is nothing to configure for different widget sizes
  • Renders the numbers it is given; it does not calculate imported or exported energy from Power, and it never converts anything to cost

How to set up

Data keys

KeyRoleTypeDescription
Power key (any name, Role = Power)Main valueTimeseries or AttributeRequired — read by its sign: positive is Import, negative is Export. Exactly one bound key can carry this role
Energy import key (any name, Role = Energy import)Imported energyTimeseries or AttributeOptional — shown as its own tile only when bound
Energy export key (any name, Role = Energy export)Exported energyTimeseries or AttributeOptional — shown as its own tile only when bound
Power factor key (any name, Role = Power factor)Power factorTimeseries or AttributeOptional — shown as its own tile only when bound

Set each key’s Role on the Data tab, not in a per-widget key-name field. With no Power key bound, the card shows a setup message instead of a reading; with the same role assigned to two keys, it flags the duplicate instead of guessing which one to use. Energy import, Energy export, and Power factor are optional — leave one unbound and its tile simply does not appear. A bound key that has never reported shows an em dash instead of an error. Units, decimals, and color all come from each key’s own Data tab settings, not from a setting on this card.

How to customize

  • To change the idle threshold — adjust Power idle threshold; readings within this range of zero show as Idle instead of Import or Export.
  • To change Power’s own status colors — adjust Power import color, Power export color, Power idle color, and Missing/no data color. A key’s own Color (from the Data tab) is what colors its tile for Energy import, Energy export, and Power factor instead.
  • To hide the last-updated time — turn off Show last updated.
  • To restyle the text — set Value font and Label font; everything else scales from these two automatically.

Tips

  • If your meter does not report Energy import and Energy export separately, pair this card with a calculated field that accumulates them from Power — bind either key as soon as it exists and its tile appears.
  • Match each energy tile’s own Color (Data tab) to Power’s Import or Export color, so the whole card reads as one system instead of three independently colored tiles.

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.