https://github.com/piotrmachowski/home-assistant-custom-components-tge
This custom integration retrieves energy prices from TGE.
https://github.com/piotrmachowski/home-assistant-custom-components-tge
custom-integration energy home-assistant
Last synced: about 1 year ago
JSON representation
This custom integration retrieves energy prices from TGE.
- Host: GitHub
- URL: https://github.com/piotrmachowski/home-assistant-custom-components-tge
- Owner: PiotrMachowski
- License: mit
- Created: 2024-08-27T01:01:36.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-04-05T00:26:23.000Z (about 1 year ago)
- Last Synced: 2025-04-05T01:23:47.218Z (about 1 year ago)
- Topics: custom-integration, energy, home-assistant
- Language: Python
- Homepage:
- Size: 39.1 KB
- Stars: 16
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![HACS Custom][hacs_shield]][hacs]
[![GitHub Latest Release][releases_shield]][latest_release]
[![GitHub All Releases][downloads_total_shield]][releases]
[![Ko-Fi][ko_fi_shield]][ko_fi]
[![buycoffee.to][buycoffee_to_shield]][buycoffee_to]
[![PayPal.Me][paypal_me_shield]][paypal_me]
[![Revolut.Me][revolut_me_shield]][revolut_me]
[hacs_shield]: https://img.shields.io/static/v1.svg?label=HACS&message=Custom&style=popout&color=orange&labelColor=41bdf5&logo=HomeAssistantCommunityStore&logoColor=white
[hacs]: https://hacs.xyz/docs/faq/custom_repositories
[latest_release]: https://github.com/PiotrMachowski/Home-Assistant-custom-components-TGE/releases/latest
[releases_shield]: https://img.shields.io/github/release/PiotrMachowski/Home-Assistant-custom-components-TGE.svg?style=popout
[releases]: https://github.com/PiotrMachowski/Home-Assistant-custom-components-TGE/releases
[downloads_total_shield]: https://img.shields.io/github/downloads/PiotrMachowski/Home-Assistant-custom-components-TGE/total
# TGE Integration
This custom integration retrieves energy prices from [TGE](https://tge.pl/energia-elektryczna-rdn).
## Installation
### Using [HACS](https://hacs.xyz/) (recommended)
This integration can be added to HACS as a [custom repository](https://hacs.xyz/docs/faq/custom_repositories):
* 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*](https://github.com/PiotrMachowski/Home-Assistant-custom-components-TGE/releases/latest/download/tge.zip) and extract its contents to `config/custom_components/tge` directory:
```bash
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](http://my.home-assistant.io/) link
[](https://my.home-assistant.io/redirect/config_flow_start/?domain=tge)
### 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.
[Example templates](https://github.com/PiotrMachowski/Home-Assistant-custom-components-TGE/discussions/categories/price-templates)
### Displaying the data
You can display the data using [ApexCharts card](https://github.com/RomRider/apexcharts-card) using following configs:
* Data for today:
```yaml
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:
```yaml
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
### Powered by
[](https://jb.gg/OpenSourceSupport)
[ko_fi_shield]: https://img.shields.io/static/v1.svg?label=%20&message=Ko-Fi&color=F16061&logo=ko-fi&logoColor=white
[ko_fi]: https://ko-fi.com/piotrmachowski
[buycoffee_to_shield]: https://shields.io/badge/buycoffee.to-white?style=flat&labelColor=white&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABhmlDQ1BJQ0MgcHJvZmlsZQAAKJF9kT1Iw1AUhU9TpaIVh1YQcchQnayIijhKFYtgobQVWnUweemP0KQhSXFxFFwLDv4sVh1cnHV1cBUEwR8QVxcnRRcp8b6k0CLGC4/3cd49h/fuA4R6malmxzigapaRisfEbG5FDLzChxB6MIZ+iZl6Ir2QgWd93VM31V2UZ3n3/Vm9St5kgE8knmW6YRGvE09vWjrnfeIwK0kK8TnxqEEXJH7kuuzyG+eiwwLPDBuZ1BxxmFgstrHcxqxkqMRTxBFF1ShfyLqscN7irJarrHlP/sJgXltOc53WEOJYRAJJiJBRxQbKsBClXSPFRIrOYx7+QcefJJdMrg0wcsyjAhWS4wf/g9+zNQuTE25SMAZ0vtj2xzAQ2AUaNdv+PrbtxgngfwautJa/UgdmPkmvtbTIEdC3DVxctzR5D7jcAQaedMmQHMlPSygUgPcz+qYcELoFulfduTXPcfoAZGhWSzfAwSEwUqTsNY93d7XP7d+e5vx+AIahcq//o+yoAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH5wETCy4vFNqLzwAAAVpJREFUOMvd0rFLVXEYxvHPOedKJnKJhrDLuUFREULE7YDCMYj+AydpsCWiaKu29hZxiP4Al4aWwC1EdFI4Q3hqEmkIBI8ZChWXKNLLvS0/Qcza84V3enm/7/s878t/HxGkeTaIGziP+EB918nawu7Dq1d0e1+2J2bepnk2jFEUVVF+qKV51o9neBCaugfge70keoxxUbSWjrQ+4SUyzKZ5NlnDZdzGG7w4DIh+dtZEFntDA98l8S0MYwctNGrYz9WqKJePFLq80g5Sr+EHlnATp+NA+4qLaZ7FfzMrzbMBjGEdq8GrJMZnvAvFC/8wfAwjWMQ8XmMzaW9sdevNRgd3MFhvNpbaG1u/Dk2/hOc4gadVUa7Um425qii/7Z+xH9O4jwW8Cqv24Tru4hyeVEU588cfBMgpPMI9nMFe0BkFzVOYrYqycyQgQJLwTC2cDZCPeF8V5Y7jGb8BUpRicy7OU5MAAAAASUVORK5CYII=
[buycoffee_to]: https://buycoffee.to/piotrmachowski
[buy_me_a_coffee_shield]: https://img.shields.io/static/v1.svg?label=%20&message=Buy%20me%20a%20coffee&color=6f4e37&logo=buy%20me%20a%20coffee&logoColor=white
[buy_me_a_coffee]: https://www.buymeacoffee.com/PiotrMachowski
[paypal_me_shield]: https://img.shields.io/static/v1.svg?label=%20&message=PayPal.Me&logo=paypal
[paypal_me]: https://paypal.me/PiMachowski
[revolut_me_shield]: https://img.shields.io/static/v1.svg?label=%20&message=Revolut&logo=revolut
[revolut_me]: https://revolut.me/314ma