Skip to content

Energy Flow Card Pro ​

custom:energy-flow-card-pro shows where your energy came from and where it went over a period: today, yesterday, this week, this month or this year. It is the power flow card's tree (solar, battery and grid on the left, the home in the middle, rooms and devices on the right), drawn from energy meters instead of power sensors. The line above the tree names the period, what the grid imported and exported, and how self-sufficient the home was. YAML only.

Sources and home ​

Every source is an energy meter: the solar production, a battery's charge and discharge, a grid's import and export. The card reads what each meter counted in the period from Home Assistant's long-term statistics, so the meters need them: device_class: energy with a state_class of total or total_increasing, the meters the Energy dashboard accepts. The unit does not matter (Wh, kWh, MWh, GJ …); the card converts to kWh. Meters that count something else (water in m³ or L, gas in m³) are shown in their own unit, the unit of the card's first meter, as written, and the summary line leaves out imported, exported and self-sufficient; all of the card's meters should count the same. What a meter counted since the last compiled hour comes from its live state, so the numbers move as the meters count.

Over a period a battery both charges and discharges, and a grid both imports and exports, so their nodes show both values: what went in ↓ and what came out ↑, in one line where there is room, else one over the other. soc still puts the battery's state of charge, as it is now, on its node as a ring. Without home the card adds the sources up: production, discharge and import, less charge and export.

The flows split the way Home Assistant's Energy dashboard splits them, hour by hour for a day and day by day for longer periods: what the grid imported beyond the home charged the battery; solar charged the battery, then covered the export, and the battery covered the rest of it; the grid charged what the battery still took; the home took what was left of solar, then of the battery, then the grid. A battery with charge_from: solar (or a list of solar entities) takes only those panels' energy and never the grid's.

Periods ​

period picks the stretch of time the card shows (and comes back to, see the picker below): today (the default), yesterday, week (from Monday), month or year. The periods follow the calendar in Home Assistant's time zone (or the browser's, as your profile says), and the card turns over by itself at midnight, on Monday and on the first of the month.

Picking the time frame ​

The header carries a picker: ‹ goes to the period before, › to the one after (up to the running one), and the button between them names the period shown (Today, Yesterday, Fri 23 Oct, 6 – 10 Oct, March 2026) and opens a calendar, as Home Assistant's date picker does. The button keeps one width whatever it names, so nothing in the header moves as you step; a long range is cut, its tooltip names it in full. Quick picks give today, yesterday, this week, month and year and the last 7 and 30 days; on the calendar two clicks pick any range of days, its first day and then its last (the same day twice: that day). The calendar's title opens the months and the years, to get to a far month quickly. A range that is exactly a day, a week (Monday to Sunday), a month or a year steps by it with ‹ ›, any other range by its own length. Nothing after today can be picked; the arrow keys move through the calendar, Page Up and Page Down turn its page, Escape closes it. The pick is the viewer's own and lasts while the page is open: after ten minutes without a touch, and on a reload, the card shows its period again, so a wall tablet comes back to today. period_picker: false leaves the picker out for a card that always shows its period; the summary line then names the period. Without a title the card is titled Energy.

Following the dashboard's period ​

On a dashboard with Home Assistant's energy date picker (the energy-date-selection card), period: dashboard makes the card show the period picked there, as Home Assistant's own energy cards do: one picker for the whole dashboard. The card then has no picker of its own and its summary line names the period. Without a date picker on the dashboard it shows today. collection_key follows another picker, the one with the same collection_key (Home Assistant's own option, it starts with energy_).

Consumers and rooms ​

Consumers, rooms, consumer_style: list, direction, flow_style (none keeps the links still), idle_links, other ({ name, icon } renames it), icon_size and visibility work as on the power flow card, with energy meters for the devices. The Other node takes what the home used beyond the consumers.

The dots move by each link's share of the home's total, so the busiest link is the one that carried the most. idle_below (default 0.05 kWh) leaves a link that carried less without motion, and hide_consumers_below (or a room's or device's hide_below) hides a device that used less in the period, in kWh. The card's rules match the home's energy in the period in kWh, and a source's or consumer's rules match its meter's energy in the period.

Power and energy side by side ​

The two cards take the same layout, so a power card for the moment and an energy card for the day read as a pair. In a sections dashboard give each half the width (grid_options: { columns: 6 }). (The demo's power sensors and energy meters are simulated apart, so their numbers do not match the way a real home's do.)

Heat distribution ​

The tree is not tied to electricity. A heat pump's heat meter as the source and the heat meters of the floors and the hot water as consumers show where the heat went. The source is a solar source with its own name and icon; other: false leaves out the Other node when the consumers account for all of it. Without a grid source there is nothing to be self-sufficient of, so the summary line leaves the self-sufficiency out.

Hover ​

hover: true shows what a click will do, as on the power flow card: a node's circle brightens under the pointer, and header entities take a light layer; consumers drawn as a list keep still. On the card it is the default for every node; a source, the home or a consumer sets its own. See Hover.

Reference ​

Card options ​

OptionDefaultDescription
sourcesrequiredSolar, battery and grid entries (below), in drawing order.
periodtodaytoday, yesterday, week (from Monday), month or year, in Home Assistant's time zone; dashboard: the period of the dashboard's energy date picker.
collection_keythe dashboard'sWith period: dashboard: the collection_key of the energy date picker to follow.
period_pickertrueThe picker in the header: the viewer steps to another day, week, month or year; back to period after ten minutes untouched. false: always period.
titleEnergyThe header's text, templates allowed.
homesum of the sourcesThe home's energy meter, or an entity object with name, icon, rules and actions.
consumers–Devices ({ entity, name, icon }) or rooms ({ group, icon, entities }) with energy meters, in drawing order.
idle_below0.05kWh below which a link is idle (no motion); 0 lets every trickle flow.
decimals{ kwh: 1, mwh: 2 }Decimals of the values: one number for both units, or { kwh, mwh }. Values show in MWh from 1000 kWh.
hide_consumers_below–Hides a consumer while it used less than this many kWh in the period. A room or consumer's own hide_below overrides it, 0 never hides.
rules–[{ below, above, color, label, tint_card }] on the home's energy in the period in kWh; first match wins.
consumer_style, other, direction, flow_style, idle_links, icon, actions, hover …as the power flow cardSee the power flow card's options.

Sources ​

OptionApplies toDescription
typeallsolar, battery or grid.
entitysolarProduction: an energy meter.
charge, dischargebatteryThe energy into and out of the battery: two energy meters, both required.
import, exportgridThe energy from and to the grid: energy meters (export optional).
socbatteryState of charge in %, shown as the node's ring (as it is now).
charge_frombatterysolar: only the panels charge this battery, never the grid. The entity of a solar source (or a list of them): only those panels. Default any.
name, icon, color, rules, decimalsallAs on every entity; rules match the meter's energy in the period (kWh).
secondary, icon_size, visibility, hoverallAs on the power flow card.

The power flow card's power, both_ways, invert, peak, price, offline, generator and fossil describe a moment and are not options here; the card says so when it meets one.

Released under the MIT License.