A HACS custom integration that brings your Wiener Netze smart meter data into Home Assistant using the official Wiener Netze Smart Meter API.
It is a thin Home Assistant layer on top of
tschoerk's wiener-netze-smart-meter-api
package (installed automatically from PyPI), which talks to the official
endpoint instead of recreating the web login — so it does not break on
captchas, rate limiting, or website changes.
- Getting your API credentials
- Installation
- Configuration
- What you get
- Cost tracking (dynamic tariff)
- Services
- Notes & limitations
- Credits & License
You need three values from Wiener Stadtwerke / Wiener Netze: a client ID, a client secret, and an API key. These steps mirror the upstream API project:
- Create an account at the Wiener Stadtwerke Developer Portal.
- Create an application for the WN_SMART_METER_API.
- When the application is approved you will get an e-mail from the API Developer Portal. The API key is then found in the details of the newly created application.
- Write an e-mail to the Smart Meter Portal Support to connect the application with your Smart Meter Portal user. It usually takes 1–2 weeks to get a response.
- Afterwards the client ID and client secret can be found in the settings of the Smart Meter Business portal.
- In HACS, open the menu (⋮) → Custom repositories.
- Add
https://github.com/KrOnAsK/Wiener-Netze-Smart-Meter-Integrationwith category Integration. - Install Wiener Netze Smart Meter, then restart Home Assistant.
- Go to Settings → Devices & Services → Add Integration, search for Wiener Netze Smart Meter.
- Enter your client ID, client secret, and API key. They are stored encrypted by Home Assistant — no YAML editing required.
- A Latest daily energy sensor per meter (
zaehlpunkt) holding the most recent available daily consumption value (Wh). This is informational — see thereading_dateattribute for the day it belongs to. - Hourly energy long-term statistics per meter for the Energy dashboard.
Quarter-hour API data is summed into hourly buckets and imported with correct
historical timestamps. On first run the last
BACKFILL_DAYS(default 30, seeconst.py) of history is backfilled; use the import service to backfill everything.
Add the hourly statistic on the Energy dashboard under
Settings → Dashboards → Energy → Add consumption, picking
wiener_netze_smart_meter:<meter>_hourly_energy.
If you have a dynamic tariff with an hourly price sensor (e.g. the EPEX Spot integration's total price sensor), the integration can compute accurate per-hour cost:
- Open the integration's Configure dialog and select your price sensor.
- A new statistic
wiener_netze_smart_meter:<meter>_hourly_cost(in €) is produced: for each hour,cost = energy_kWh × that hour's price. - On the Energy dashboard, set "Use an entity tracking the total costs" to that statistic.
This matches each hour's energy to that same hour's price, which is more accurate than Home Assistant's single current-price model. The price per hour is read from the price sensor's hourly statistics (for backfilled history), overlaid with its live forecast attribute for recent hours.
To verify it is working, go to Developer Tools → Statistics and search for
hourly_cost. The wiener_netze_smart_meter:<meter>_hourly_cost entry should
appear (unit €, no issue). Add it to a Statistics Graph card to see the
per-hour cost, and sanity-check a single hour: cost ≈ hourly kWh × price/kWh
for that hour. If it is missing, make sure the price sensor is selected in the
integration's Configure dialog and that it has price history covering the
hours you imported.
Fetches the full available measurement history (the API default is about the last 3 years) for all meters and rebuilds the hourly energy (and cost) statistics from scratch. Run it once to seed history; the regular 12-hour updates keep it current afterwards. It makes many API requests and can take a while.
- The official API publishes measurements with a 1–2 day delay, so the most recent values always lag by a day or two.
- Home Assistant long-term statistics are bucketed hourly, so sub-hour (15-minute) resolution is not preserved on the Energy dashboard.
- Cost backfill only reaches as far back as your price integration retained its hourly price statistics.