TGE Integration
April 5, 2025 · View on GitHub
TGE Integration
This custom integration retrieves energy prices from TGE.
Installation
Using HACS (recommended)
This integration can be added to HACS as a custom repository:
- URL:
https://github.com/PiotrMachowski/Home-Assistant-custom-components-TGE - Category:
Integration
After adding a custom repository you can use HACS to install this integration using user interface.
Manual
To install this integration manually you have to download tge.zip and extract its contents to config/custom_components/tge directory:
mkdir -p custom_components/tge
cd custom_components/tge
wget https://github.com/PiotrMachowski/Home-Assistant-custom-components-TGE/releases/latest/download/tge.zip
unzip tge.zip
rm tge.zip
Configuration
Config flow
To configure this integration go to: Configuration -> Integrations -> Add integration -> TGE.
You can also use following My Home Assistant link
Value templates
You can override values returned by this integration by providing value templates for chosen sensors. This functionality is available in "Configure" menu.
WARNING: calculations are performed using zł/MWh and MWh - templates should return values using the same units. Conversion to units configured in the previous step is performed automatically in the later steps of data processing.
Displaying the data
You can display the data using ApexCharts card using following configs:
- Data for today:
type: custom:apexcharts-card graph_span: 24h span: start: day header: show: true title: TGE Fixing 1 Today [zł/MWh] now: show: true label: Now series: - entity: sensor.tge_fixing_1_rate type: column name: Fixing 1 float_precision: 2 data_generator: | return entity.attributes.prices_today.map((val, index) => { return [new Date(val['time']), val['price']]; }); - Data for tomorrow:
type: custom:apexcharts-card graph_span: 24h span: start: day offset: +1d header: show: true title: TGE Fixing 1 Tomorrow [zł/MWh] now: show: true label: Now series: - entity: sensor.tge_fixing_1_rate type: column name: Fixing 1 float_precision: 2 data_generator: | return entity.attributes.prices_tomorrow.map((val, index) => { return [new Date(val['time']), val['price']]; });
Support
If you want to support my work with a donation you can use one of the following platforms:
| Platform | Payment methods | Link | Comment |
|---|---|---|---|
| Ko-fi |
|
|
|
| buycoffee.to |
|
|
|
| PayPal |
|
|
|
| Revolut |
|
|
|
