jchrzaniuk GitHub avatar

PolishEnergyPrices

jchrzaniuk

Calculates the current gross price per kWh for Polish households connected to one of five major distribution operators, usable as a Home Assistant integration or as a standalone Docker service with HTTP and MQTT.

Stars

4

7-day growth

No data

Forks

0

Open issues

0

License

MIT

Last updated

2026-07-31

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It combines official URE, DSO, OZE, and cogeneration sources into a practical tariff-aware price sensor, exposes transparent price breakdowns, and supports both Home Assistant and openHAB via Docker.

Who it is for

  • Polish Home Assistant users with G11-G13 tariffs from TAURON, PGE, ENERGA, Stoen, or ENEA
  • openHAB users who need current electricity prices through HTTP or MQTT
  • Households that want to track variable energy costs in the Home Assistant Energy panel
  • Developers looking for a robust pattern for tariff-aware energy price integrations

Use cases

  • Display the current gross PLN/kWh price as a current-price entity in the HA Energy panel
  • Run a standalone Docker container that publishes the price and its components over HTTP and retained MQTT
  • Create cumulative cost statistics for meters that only expose external statistics without a sensor entity
  • Inspect the gross price breakdown by energy, grid, quality, OZE, cogeneration, excise, and VAT

Strengths

  • Covers the five largest Polish DSOs with a wide set of G11/G12/G13 tariff families
  • Combines official URE, DSO, BIP, and ELI data sources and validates documents before activating rates
  • Works natively in Home Assistant via HACS and also as a standalone Docker service for other systems
  • Provides a detailed per-component price breakdown and supports a cost-statistics bridge for external meter data

Considerations

  • Built-in rates are only valid through 2026; if no new tariff or document format is published, the sensor or container profile becomes unavailable
  • Only supports the five largest OSDs, not all Polish distribution operators
  • The price excludes monthly fixed charges such as the fixed network fee, subscription, trade fee, and household capacity fee

README quick start

Polish Energy Prices

Projekt oblicza bieżącą cenę brutto 1 kWh dla gospodarstw domowych przyłączonych do jednego z pięciu największych OSD: TAURON, PGE, ENERGA, Stoen i ENEA. Można go używać jako natywnej integracji Home Assistant albo jako niezależnej usługi Docker z HTTP i MQTT dla openHAB oraz innych systemów.

W Home Assistant encja ma jednostkę PLN/kWh i może zostać wskazana w panelu Energia jako encja z bieżącą ceną. Kontener publikuje tę samą cenę wraz ze składnikami przez API HTTP i retained MQTT.

Silnik łączy cenę energii czynnej sprzedawcy z urzędu z właściwym dla aktualnej godziny składnikiem sieciowym, opłatą jakościową, OZE, kogeneracyjną i VAT-em. Co 12 godzin sprawdza cenę sprzedaży energii oraz urzędowe źródła wszystkich zmiennych składników rachunku. Ostatni poprawny, kompletny zestaw jest zapisywany lokalnie; przy awarii źródła używany jest cache, a przy pierwszym uruchomieniu — zweryfikowane stawki wbudowane.

[!IMPORTANT] Stawki wbudowane są bezpiecznym punktem startowym na okres 1.01–31.12.2026, ale nie są już jedynym źródłem. Integracja wykrywa dokument na bieżący rok, sprawdza kompletność wszystkich stref i dopiero wtedy aktywuje nowy zestaw. Jeżeli nowa taryfa nie zostanie opublikowana albo zmieni się układ dokumentu, wygasły zestaw nie jest używany po swojej dacie końcowej. Sensor albo profil kontenera staje się niedostępny i pokazuje błąd źródła.

Docker, openHAB i inne systemy

Publiczny obraz działa na amd64 i arm64. Nie wymaga Home Assistanta ani logowania do GHCR:

ghcr.io/jchrzaniuk/polish-energy-prices:latest
ghcr.io/jchrzaniuk/polish-energy-prices:v1.5.0

Uruchomienie gotowego obrazu

Potrzebujesz Docker Engine z poleceniem docker compose oraz działającego brokera MQTT.

  1. Pobierz repozytorium i przejdź do jego katalogu:

    git clone https://github.com/jchrzaniuk/PolishEnergyPrices.git
    cd PolishEnergyPrices
    
  2. Utwórz własny plik konfiguracji:

    cp service/config.example.yaml service/config.yaml
    
  3. W service/config.yaml ustaw operatora, taryfę i źródło ceny. Zmień też mqtt.host z przykładowego mqtt na adres brokera widoczny z kontenera. W razie potrzeby wpisz użytkownika i hasło przez zmienne opisane w pełnej instrukcji usługi.

  4. Uruchom kontener:

    docker compose up -d
    

Related repositories

Similar projects matched by category, topics, and programming language.

lopopolo
Featured
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI & Machine LearningAI Agents
2,390
slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
littledivy
Featured
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI & Machine Learning
1,482