Smart Home Assistant

Trading212 Lovelace Card: Complete Setup Guide for Home Assistant

SepehrBy Sepehr· 26 June 2026· Updated 26 June 2026· 5 min read
✓ Independent — no paid placements✓ UK-tested in real homes✓ Cited sources on every guide
Trading212 Lovelace Card: Complete Setup Guide for Home Assistant
On this page[tap to expand]

The Trading212 Home Assistant integration does the hard work of pulling your portfolio into HA as sensors. The Trading212 Lovelace card is what makes those sensors useful at a glance — a purpose-built dashboard card with auto-discovery, sparklines, and responsive layout that adapts to any Home Assistant theme. This guide walks through the full setup from HACS install to a finished portfolio dashboard.

Prerequisites

You need the Trading212 integration installed first. The card reads sensors that the integration creates — without them, there is nothing to display. Follow the Trading212 integration guide to get the sensors populating, then come back here. You will also need HACS installed to access the card.

Installing via HACS

The card is not yet in the default HACS catalogue, so you add it as a custom repository first — a one-time step that takes about 30 seconds.

  1. Open HACS → Frontend, then click the three-dot menu (⋮) in the top-right corner and choose Custom repositories.
  2. Paste https://github.com/Smart-Home-Assistant-UK/lovelace-trading212-card, set Category to Plugin, and click Add.
  3. Find Trading212 Lovelace Card in the HACS Frontend list and click Download.
  4. Reload your browser tab.
  5. Go to any dashboard, click Add Card, search for investment, and your five new card types appear.
Trading212 Health card in Home Assistant — portfolio value with 7-day sparkline and daily P&L
The Health card after a fresh install — no configuration needed.

The five card types

Each card serves a different part of your portfolio view. You can use them individually or combine them on a single dashboard.

Health card

The best card to start with. It shows your total portfolio value alongside a 7-day sparkline drawn from the HA recorder, today's pound and percentage P&L, and your top and bottom daily movers. Zero YAML needed:

type: custom:investment-health-card

The sparkline builds up over the first week as HA accumulates history from the integration's polls (default every 60 seconds).

Trading212 Overview card — account stat grid with daily movers
The Overview card displays all account-level stats in a compact grid.

Portfolio card

The all-in-one option. Combines the account overview, a scrollable positions list, and a pies list in one card. Ideal if you want a single-card dashboard view:

type: custom:investment-portfolio-card

You can hide sections you do not need:

type: custom:investment-portfolio-card
show_pies: false

Overview card

Shows the account stat grid and daily movers without any positions or pies. Good as a compact summary at the top of a more detailed dashboard:

type: custom:investment-overview-card

Positions card

A scrollable list of every open position with its value, P&L, return percentage, and a mini sparkline for each instrument. The list grows automatically as you open new positions — no config changes needed:

type: custom:investment-positions-card
Trading212 Positions card expanded — positions detail with per-instrument sparklines
The Positions card expanded — each row shows value, P&L, return, and a sparkline.

Pies card

Tracks your Trading212 pies with value, P&L, goal progress, and a dividend breakdown per pie. Also auto-discovers new pies without requiring config changes:

type: custom:investment-pies-card
Trading212 Pies card — scrollable pies list with goal progress
The Pies card showing goal progress and dividend data for each pie.

Configuration

Most users never need to touch the configuration — the cards auto-discover sensors using the default prefix sensor.trading212_. The only time you need to set options is if you have changed the integration's entity prefix or want to constrain the Portfolio card's layout.

OptionDefaultCardsDescription
prefixsensor.trading212_AllSensor prefix for auto-discovery
max_height400pxPositions, PiesMax height before the list scrolls
show_overviewtruePortfolioShow/hide the overview section
show_positionstruePortfolioShow/hide positions
show_piestruePortfolioShow/hide pies

A clean portfolio dashboard uses three sections. Create a new dashboard in Settings → Dashboards → Add Dashboard (icon: mdi:chart-line), then lay it out as follows:

  1. Top row: Health card (full width) — gives you value, sparkline, and daily P&L at a glance.
  2. Middle row: Positions card (left, ~60% width) and Pies card (right, ~40% width) — side-by-side on desktop, stacked on mobile.
  3. Optional bottom row: A mini-graph-card pointing at sensor.trading212_total_value with hours_to_show: 720 for a 30-day portfolio chart. See the dashboard automation guide for the full YAML.

On mobile the cards stack automatically and the scrollable lists have max_height: 400px so the page stays navigable.

Theming

The card uses Home Assistant's CSS custom properties throughout — it reads --primary-color, --card-background-color, and related variables automatically. Switch HA themes and the card adapts without any changes. The iOS dark theme available from HACS looks particularly clean with the sparklines.

Sparkline colours follow P&L sign: positive values render in green (or your theme's success colour), negative in red (or your theme's error colour). This is automatic and cannot be overridden per card.

Notes and caveats

Sparklines need history. The 7-day trend on the Health card and per-position mini-graphs draw from the HA recorder database. After a fresh integration install, you will see a flat or short line until enough poll cycles have accumulated — usually a day or two of data before the chart looks meaningful.

Read-only. Like the integration itself, the card only displays data. It cannot place, cancel, or modify orders on your behalf.

Auto-discovery relies on the entity prefix. If you have customised your integration's entity IDs via the entity registry, set the prefix option to match. The default sensor.trading212_ covers the standard install with no changes.

Frequently asked questions

Does the Trading212 Lovelace card work without the integration?
No — the card reads sensors created by the Trading212 Home Assistant integration. You need to install the integration first and let it complete at least one poll cycle before the card has anything to display.
Where do the sparklines come from?
The 7-day trend on the Health card and the per-instrument mini-graphs on the Positions card are drawn from the Home Assistant recorder database. The integration polls Trading212 on a configurable interval (default 60 seconds), and each poll writes a new state to the recorder. After a day or two of polling you will have enough data points for a smooth sparkline.
Can I use the card with a different broker integration?
Yes, if your broker integration follows the same sensor naming convention. Set the prefix option to your integration's entity prefix (e.g. sensor.my_broker_) and the card will auto-discover positions and pies from that prefix instead.
Does the card work on the Home Assistant mobile app?
Yes — the card is fully responsive. Scrollable lists (Positions, Pies) have a max_height of 400px by default so they stay navigable on small screens. The card also adapts to any HA theme, including the iOS dark theme available from HACS.

Sources

Sources verified 2026-06-26

  1. Smart Home Assistant UK — Trading212 Lovelace Card — GitHub
  2. Home Assistant — HACS — Frontend cards
  3. Home Assistant — Recorder integration
Sepehr

Written by

Sepehr

10+ years smart home experience · Runs Home Assistant locally · Tests every product reviewed

Smart home specialist with 10+ years running a self-hosted Home Assistant setup — Zigbee2MQTT, Frigate NVR, and local-first automations. Independent coverage for UK homes, no brand deals.

LinkedIn →

Related reading