Ulrich Lehner

LINZ NETZ Smart Meter in Home Assistant · Part 2

LINZ NETZ Energy: a Home Assistant App for the Smart Meter, Built with Claude Code

A Home Assistant app that puts a LINZ NETZ smart meter into the Energy dashboard: live readings from the meter, completed by the portal, with the costs as on your bills. Why it exists, what it does and how to install it.

Illustration of a desk at night by a window with a dusk sky: a monitor shows a wordless energy dashboard with one row of blue and amber hourly bars and a check mark, a laptop shows abstract code, an electricity bill with coins lies in front, and a small single-board computer with an antenna sends radio waves from the windowsill
AI-generated illustration

LINZ NETZ Energy is a Home Assistant app that turns a LINZ NETZ smart meter into one clean consumption statistic for the Energy dashboard, together with the electricity costs as they appear on your bills. It uses the live readings from the meter and fills their gaps with the data of the LINZ NETZ service portal. It is open source, in the linznetz_energy folder of ulrichlehner/homebase, and it was built with Claude Code.

This is Part 2 of the series. Part 1 set up the live source: an RTL-SDR dongle that receives the meter's radio telegrams, the wmbusmeters app and a custom driver. The app also works on portal data alone, but the two together are the point.

ItemDetail
Runs onHome Assistant OS, on a Raspberry Pi 4 or 5 (aarch64) or amd64
NeedsA LINZ NETZ service portal account with the quarter-hour analysis (Viertelstundenauswertung) enabled
OptionalA live energy counter in Home Assistant, for example the radio receiver from Part 1

LINZ NETZ Energy is not affiliated with LINZ NETZ GmbH. It uses the public customer portal with your own login, the same way you would in the browser.

Why an app

Neither data source is complete on its own. The live readings arrive right away, but the receiver is a small dongle: a restart or a moved antenna leaves a gap, and the meter itself sends no usable energy counter for about half an hour several times a day. The portal has the quarter-hour values the bill is calculated from, but they appear one to two days late.

Home Assistant has no built-in way to combine the two. The existing portal integrations import the portal's data on its own. The app merges both into one statistic: for every hour it takes the best source it has, the live reading first and the portal as check and filler, and it rebuilds the statistic on every run, so a value the portal corrects later replaces the earlier one.

What the app does

  • One consumption statistic for the Energy dashboard, with no hour counted twice.
  • The costs as a running total in EUR: energy price, grid charges, levies, fixed fees, VAT and subsidies. The grid charges are read once a day from the Austrian legal information system RIS, so a new year's charges count without an update.
  • Supplier prices. For go green energy's strom flex the monthly price is read automatically; any other supplier works with a fixed price or a price list.
  • Historic data. Older readings can be uploaded on the app's page, so the Energy dashboard shows more than the portal still keeps.
  • Status entities and its own page in Home Assistant: last fetch, deviations between live and portal, and a setup checklist.

The app only writes its own statistics, entities and notifications. It never changes the Energy dashboard; switching to its statistic is your click.

Install it

Before you start, enable the quarter-hour analysis for your meter in the LINZ NETZ service portal and note the metering point number (Zählpunktnummer: 33 characters starting with AT, not the meter number).

  1. In Home Assistant open Settings, Apps, Install app. Open the menu (⋮), then Repositories, and add https://github.com/ulrichlehner/homebase.
  2. Install LINZ NETZ Energy. On its Configuration tab fill in portal_username, portal_password and metering_point, and set site to the name of the place (default Home). Save and start the app.
  3. Open the app's page (Open Web UI). The first download fetches everything the portal still has. The Setup tab lists the remaining steps.
  4. Under Setup, Live meter, pick the energy counter from Part 1. Under Setup, Supplier and prices, set your supplier.
  5. Create a backup, then open Settings, Energy, Electricity grid and edit the grid connection. Choose "<Site> grid consumption" as the energy imported from grid and "<Site> electricity cost" for the cost tracking. Keep only one consumption source, otherwise the dashboard counts everything twice.

The switch can be undone at any time: the statistics of the old sensor stay.

Built with Claude Code

The app was written in Claude Code sessions, starting from a written plan that split the work into small steps, each with a check that could be run before the next one began. Each step was tried on my own Home Assistant and my own bills before it went into a release, because that is where the bugs that mattered showed up. The app's page, documentation and changelog describe the details.

Sources

Working with Claude