[Custom Component] PGE DataHub (Poland) - Dynamic Electricity Prices

Hi everyone!

I have developed a custom integration for Home Assistant that fetches electricity prices directly from the PGE DataHub API (Polish Balancing Market - TGE Fix_1). This is particularly relevant for users in Poland preparing for the upcoming rollout of dynamic tariffs.

My goal was to create a reliable, direct-to-source tool that provides the high-resolution data needed for smart energy management (EV charging, battery storage, heat pumps).

Key Features:

  • Official Data Source: Fetches prices directly from PGE DataHub (Fix_1 contract) without any third-party intermediaries.
  • Auto-Conversion: Automatically converts MWh prices to PLN/kWh for easy tracking in the Energy Dashboard.
  • 24-Hour Schedule: Provides 24 individual sensors (one for each hour) plus a “Current Price” sensor for real-time automation.
  • HA Best Practices: Built with DataUpdateCoordinator for efficiency and features a full Config Flow (UI-based setup – no YAML required).

Future Development & Feedback: This project is in its early stages, and I plan to develop it actively. I am very open to community feedback—if you have suggestions for additional sensors (e.g., daily average, cheapest price window, or price thresholds), please let me know. I want to build this based on actual user needs for energy optimization.

Installation: You can add the repository to HACS as a “Custom Repository”. :link: GitHub: GitHub - AllonGit/ha_pge_dynamic: Ceny dynamiczne PGE/TGE dla Home Assistant. 25 sensorów (24h + aktualna cena) do inteligentnego ładowania magazynów energii i EV.

I have included the apexcharts-card configuration in the README to help you set up a visualization identical to the one in the screenshot.

I look forward to your feedback and ideas!

#HomeAssistant #EnergyManagement #DynamicTariffs


#Poland #SolarEnergy

3 Likes

Here is a natural, professional translation of your update:


English Translation

Hi everyone!

I’d like to share a major update for my Energy Hub Poland integration, now at version 1.3.0. If you track energy prices (RCE), own a PV system, or are simply interested in the state of the Polish power grid, this release brings some significant new features.

:zap: What’s New? Switching to the Official PSE API

Until now, the primary source was PGE DataHub. Starting with version 1.3.0, the integration connects directly to the official reporting system of Polskie Sieci Elektroenergetyczne (PSE). What does this change?

  • “Cheapest Quarter-Hour” Logic: PSE publishes prices every 15 minutes. The integration now automatically analyzes all four quarters within each hour and selects the lowest rate, which typically corresponds to Fixing 1.
  • Intelligent Fallback: If the PSE API experiences downtime, the integration will automatically switch back to PGE data, ensuring your energy statistics remain uninterrupted.

:bar_chart: New Sensors – KSE Grid Monitoring

New and insightful entities have been added to the Dynamic Mode:

  • KSE: Demand: Check the current and forecasted load of the national power system (in MW).
  • KSE: RES Generation: See exactly how much power is being generated by all wind farms and photovoltaics in Poland at any given moment.

:rocket: Performance & Optimization

I’ve made sure the integration doesn’t “choke” lower-spec hardware:

  • Price updates occur only twice a day (whenever new rates are released).
  • Demand and generation data refresh every 5 minutes.

:hammer_and_wrench: How to Update?

  • HACS: The update should appear in your panel shortly.
  • Manual Install: Simply replace the files in the custom_components/energy_hub_poland folder.

Please note that the new generation and demand sensors are available specifically in Dynamic Mode (RCE).

I’m looking forward to your feedback! If you have ideas for future sensors (e.g., the percentage share of RES in the energy mix), let me know in the comments or on GitHub.

Happy saving!