Home Assistant projects
All projects

Energy Card

Lovelace card · Home & energy
v1.3.1 · Nov 13, 2026 HA 2024.8.0+ Marketplace

Solar inverters and home batteries from Enphase, SolarEdge, Fronius, Huawei, SMA, Tesla and more: live power flow, battery, today.

Works on top of the integrations you already use (Enphase Envoy, SolarEdge, Fronius, Huawei Solar, SMA, Tesla Powerwall, Growatt, APsystems, SolaX, GoodWe) and any other power sensors, with automatic discovery and each integration's sign conventions handled: live power flow between the sun, the grid, the home and the battery, battery level and time left, today's energy, self-consumption and self-sufficiency, and the integration's switches.

Highlights

  • Enphase, SolarEdge, Fronius, Huawei, SMA, Tesla Powerwall, Growatt, APsystems, SolaX and GoodWe supported, plus any power sensors
  • Live power flow between the sun, the grid, the home and the battery, in the energy dashboard colours
  • Triangle layout without a battery, or without solar panels; grid outage shown crossed out
  • Battery level with the backup reserve, charging or discharging power and time to full or to the reserve
  • Produced, consumed, imported, exported, charged and discharged energy today, self-consumption and self-sufficiency
  • The integration's switches and selects (charge from the grid, off-grid, work mode) with a confirmation
  • Every role discovered automatically, or set by hand
  • Last 7 days of production and consumption as daily bars, with the week's totals
  • Mini card with a detail button switching to the full card

Brands & integrations

  • Enphase
  • SolarEdge
  • Fronius
  • Huawei
  • SMA
  • Tesla
  • Growatt
  • APsystems
  • SolaX
  • GoodWe

Cards

energy-cardenergy-mini-card
type: custom:energy-card

Install

  1. 1Open the repository in the Marketplace with the Add to Marketplace button above, or addgithub.com/juju35/ha-energy-card as a custom repository (category Dashboard).
  2. 2Download it from the Marketplace.
  3. 3Reload the browser and add the card from the dashboard editor.

Documentation

From the README

Features

Features

  • Two cards: a full Energy Card (custom:energy-card) and a compact Energy Mini Card (custom:energy-mini-card)
  • Live power flow between the sun, the grid, the home and the battery: dots move along the links that carry power, in the color of their source (Home Assistant's energy dashboard colors), faster with more power; the sun glows while it produces, the battery ring shows its level and pulses while it charges
  • The flows are worked out the way the energy is used: the sun serves the home first, then charges the battery and exports the rest; the grid covers what is left; the battery serves the home
  • Without a battery the diagram is a triangle; without solar panels (a battery alone), the grid, the home and the battery
  • Grid outage (backup): the grid is crossed out, nothing flows from or to it, the status says so
  • Battery: level with the backup reserve marked on its bar, charging or discharging power, time to full or to the reserve, mode, reserve and capacity
  • Today: produced, consumed, imported, exported, charged and discharged energy, self-consumption and self-sufficiency (worked out from the others), self-sufficiency in the header
  • Last 7 days: production and consumption bars per day, with the week's totals; tap a day for its own figures (tap again for the totals), from the recorder's statistics of the daily energy sensors
  • Options: the integration's switches (charge from the grid, off-grid operation…) as toggles that ask for a confirmation, and its selects (storage or work mode) with their value
  • Status chip: producing, not producing, battery charging or discharging, grid outage, inverter error
  • Header icon of a solar panel with the brand logo as a badge, opening the brand's site, in the brand's color, readable in the light and dark themes
  • The missing one of the grid and home powers is worked out from the others; powers in W, kW or MW and energies in Wh, kWh or MWh are all read
  • Collapsible sections (options folded by default)
  • Sections view: the full card takes 12 columns by default and at least 9, the mini card 6; narrow widths get their own layout (see Screenshots)
  • Detail button on the mini card (top right): it switches the mini card to the full card's content and back; a click anywhere outside the card brings the compact view back
  • Click any value to open its Home Assistant history (more-info dialog)
  • Visual editor in the dashboard UI for both cards (no YAML needed)
  • Light and dark mode, English, French, German, Spanish, Serbian (Cyrillic and Latin), Italian, Dutch, European Portuguese, Polish, Romanian, Danish, Swedish, Bulgarian, Russian, Ukrainian, Hungarian, Slovak, Czech, Slovenian, Latvian and Greek
  • Single file, no external dependency, the logos are embedded

Supported integrations

Supported integrations

Integration Brands What the cards show
Enphase Envoy (core) Enphase IQ Gateway, IQ Battery Production, consumption, net grid power, battery power and level, available energy and capacity, reserve, storage mode, grid status, production and consumption today, charge-from-grid and grid switches
SolarEdge (core) SolarEdge Solar, consumption, grid and storage power with their flow direction, storage level, production, consumption, purchased and fed-in energy
Fronius (core) Fronius Symo, Primo, GEN24 PV, load, grid and battery power, battery level and capacity, minimum reserve, energy today, inverter state and error
Huawei Solar (custom) Huawei SUN2000, LUNA2000 Input power, load, power meter, battery power and level, yield, consumption, grid supply and feed-in today, battery charge and discharge today, rated capacity, backup reserve, working mode, device status, charge-from-grid switch
SMA (core) SMA Sunny Boy, Sunny Tripower, Sunny Island PV power, grid absorbed and supplied power, battery charge and discharge power, level and capacity, daily yield, status
Tesla Powerwall (core) Tesla Powerwall Solar, load, site and battery power, charge, remaining energy and capacity, backup reserve, operation mode, grid status (outage), off-grid switch
Growatt (core) Growatt PV, load, grid import and export, battery charge and discharge power, level, and their energy today
APsystems (core) APsystems EZ1 Total power and production today
SolaX (core) SolaX Power and battery level sensors, read by their name
GoodWe (core) GoodWe PV, house consumption, active (grid) and battery power, battery level, PV generation today, work mode
Any other — Power sensors read by their name (solar / PV, grid / meter, battery / storage, load / consumption), battery level by its device class, or every role set by hand with entities

Details in Integrations.

Prerequisites

Prerequisites

Home Assistant 2024.8 or later, with an integration providing power sensors for your solar inverter, your battery or your energy meter.

Configuration

Configuration

Card types#

Card Type
Energy Card custom:energy-card
Energy Mini Card custom:energy-mini-card

Visual editor#

Both cards have a visual editor: add the card from the dashboard UI, pick the integration and the options. No YAML needed.

Minimal#

type: custom:energy-card
type: custom:energy-mini-card

Without integration, the cards show the first supported integration found.

Full options#

type: custom:energy-card
integration: enphase_envoy    # integration domain (enphase_envoy, solaredge, fronius, huawei_solar, sma, powerwall…)
title: Solar                  # optional, defaults to the brand
show_flow: true
show_battery: true
show_today: true
show_options: true
show_controls: true           # toggles of the switches (false: their state only)
collapsed:                    # sections folded by default
  - options
entities:                     # optional, sets or replaces any role
  solar: sensor.pv_power
  grid: sensor.grid_power
  battery: sensor.battery_power
  soc: sensor.battery_level
  home: sensor.house_power
invert_grid: false            # true: the grid sensor is positive when exporting
invert_battery: false         # true: the battery sensor is positive when charging
language: en                  # optional, defaults to the Home Assistant language
type: custom:energy-mini-card
integration: huawei_solar
zoom: true                    # detail button at the top right

A card can also be built from entities alone, without integration (a meter and a few sensors of different integrations, say).

Options reference#

Option Card Default Description
integration both First supported integration Integration domain to display (enphase_envoy, solaredge, fronius, huawei_solar, sma, powerwall, growatt_server, apsystems, solax, goodwe, or any other domain with power sensors)
title both Brand name Card title
show_title both true Show the title in the header (e.g. false under a section heading of your own)
show_subtitle both true Show the subtitle under the title
zoom mini true Detail button at the top right of the mini card: it shows the full card's content (with the same options, so show_today, collapsed… can be set on the mini card too) and switches back to the compact view; a click outside the card also brings the compact view back. false removes the button
show_flow full true Power flow diagram
show_battery full true Battery section
show_today full true Today's energy
show_week full true Production and consumption of each of the last 7 days (bars named by their short day, a day's figures on hover or when tapped) and their totals, from the daily change of the today energy sensors in the recorder's statistics (one query an hour)
show_options full true Options: the integration's switches and selects
show_controls full true Toggles of the switches; false shows their state only
collapsed full [options] Sections folded by default, among battery, today, week and options ([] to unfold everything). Click a section title (or Tab to it and press Enter or Space) to fold or unfold it
entities both — Entities set by hand, by role: solar, home, grid (+ import, − export), grid_import, grid_export, battery (+ discharge, − charge), battery_charge, battery_discharge, soc, solar_today, home_today, import_today, export_today, charge_today, discharge_today, battery_energy, battery_capacity, reserve, mode, status, error, grid_status
invert_grid both false The grid sensor is positive when exporting
invert_battery both false The battery sensor is positive when charging
language both Auto Force language: fr, en, de, es, sr, sr-Latn, it, nl, pt, pl, ro, da, sv, bg, ru, uk, hu, sk, cs, sl, lv or el (auto-detects from HA settings)

How it works

How it works

Integrations#

The cards group the entities of an integration (its domain), whatever the device they belong to: an Enphase gateway and its batteries, a Huawei inverter, its battery and its meter make one system. Each entity gets a role (solar, home, grid, battery, battery level, today's energy, reserve, mode…) from its translation_key, mapped per integration; integrations without translation keys (GoodWe) are read by the end of their entity ids. Power sensors the mapping leaves out are read by their name (pv, solar, grid, meter, battery, storage, load, consumption…), and a battery level by its battery device class. entities sets or replaces any role.

Signs and units#

The cards use one convention: grid positive when importing, battery positive when discharging. Integrations with the other convention are turned around (Huawei Solar's meter and battery, GoodWe's active power), unsigned powers are read with their direction sensor (SolarEdge's grid and storage flow directions), and a negative load (Fronius) is read as a consumption. invert_grid and invert_battery turn around a meter wired the other way. Powers in W, kW or MW and energies in Wh, kWh or MWh are converted; a sensor in the wrong kind of unit is ignored.

Power flow#

The flows between the nodes are worked out from the four powers: the sun serves the home first, then charges the battery, and exports what is left; the grid covers the rest of the home and of the charge; the battery serves the home, and exports beyond what the sun exports. When the integration gives no home power it is worked out from the others (sun + grid + battery), and the grid from the home the other way round.

Today#

Self-consumption is the share of the production used at home (produced − exported) / produced, self-sufficiency the share of the consumption not taken from the grid (consumed − imported) / consumed. When the integration gives no consumption, it is worked out from the production, the import and the export (and the battery's charge and discharge).

Brands#

The integration gives the logo of the header badge and the accent color of the card, lighter in the dark theme. Unknown integrations get the solar panel icon alone and an amber accent.

Support

Support

If you find this project useful, you can support its development:

Buy Me a Coffee

Changelog

All 8 versions

1.3.1Nov 13, 2026Latest

Fixes

  • Folding back on a tap elsewhere now works on iOS (Safari and the companion app): a tap on something that is not clickable sent no click to the page, so the unfolded sections, the confirmation and the detailed view of the mini card stayed open. The press and the release are caught instead; a slider dragged out of the card and a scroll do not fold anything.
  • Leaving the card (another dashboard view, a conditional card hidden) brings it back in its default state: sections folded as configured, confirmation closed, mini card compact.
  • Clicks lost under an update: Home Assistant updates the card several times a second, and an update that rewrote the card between the press and the release replaced the element pressed, so that the click landed on the card itself and did nothing. The card is no longer rewritten while a press is in progress; the pending update is drawn right after the click.
  • Focus ring after a mouse click: the focus was put back on the clicked element after each update, which drew the focus ring. It is now kept across updates only for the keyboard.

1.3.0Nov 12, 2026

Features

  • show_title and show_subtitle options (also in the visual editor) hide the header's title and its subtitle, separately, for a card placed under a section heading of its own (asked in juju35/ha-vehicle-card#72).

1.2.2Nov 9, 2026

Improvements

  • Last 7 days: short day names (Tue, Wed…) instead of the letters that repeat (T W T F S S M), and a tapped day shows its own production and consumption in place of the week's totals (tap it again for the totals) — the hover tooltip didn't work on a phone.

1.2.1Nov 9, 2026

Maintenance

  • No code change: released again to check the installation from the Marketplace.

1.2.0Nov 9, 2026

Features

  • Last 7 days: a section with the production and consumption of each of the last 7 days as bars (the day's figures on hover) and the week's totals, from the daily change of the today energy sensors in the recorder's statistics (one query an hour). show_week: false hides it; week can be folded like the other sections.

1.1.1Nov 9, 2026

Fixes

  • Translations: the cards are defined once the page's language file has arrived (at most 1.5 s; Home Assistant builds a card when its element gets defined), so the first render is already translated instead of English then redrawn; until a language file is in, a missing text reads the English one wherever the card has no fallback of its own.