|
| 1 | +# 🇵🇱 ENTSO-E Ceny Energii |
| 2 | + |
| 3 | +<p align="center"> |
| 4 | + <img src="images/logo.png" alt="ENTSO-E Ceny Energii by Smarting HOME" width="400"> |
| 5 | +</p> |
| 6 | + |
| 7 | +<p align="center"> |
| 8 | + <a href="https://github.com/hacs/integration"><img src="https://img.shields.io/badge/HACS-Custom-41BDF5.svg" alt="HACS"></a> |
| 9 | + <a href="https://www.home-assistant.io/"><img src="https://img.shields.io/badge/Home%20Assistant-2024.1+-blue.svg" alt="HA"></a> |
| 10 | + <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License"></a> |
| 11 | + <a href="https://smartinghome.pl"><img src="https://img.shields.io/badge/Smarting%20HOME-smartinghome.pl-00CCAA.svg" alt="Smarting HOME"></a> |
| 12 | +</p> |
| 13 | + |
| 14 | +--- |
| 15 | + |
| 16 | +Profesjonalna integracja HACS dla **Home Assistant**, pobierająca **ceny energii day-ahead** z platformy [ENTSO-E Transparency](https://transparency.entsoe.eu/). |
| 17 | + |
| 18 | +Domyślnie skonfigurowana dla **Polski** — z przeliczeniem na **PLN/kWh**, automatycznym kursem EUR/PLN z **NBP** i polskim VAT 23%. |
| 19 | + |
| 20 | +> 🏠 Wydawca: **[Smarting HOME](https://smartinghome.pl)** — inteligentne zarządzanie energią w domu |
| 21 | +
|
| 22 | +--- |
| 23 | + |
| 24 | +## ✨ Funkcje |
| 25 | + |
| 26 | +| Funkcja | Opis | |
| 27 | +|---------|------| |
| 28 | +| ⚡ **Aktualna cena** | Cena energii w bieżącej godzinie | |
| 29 | +| ⏭️ **Następna godzina** | Cena na kolejną godzinę | |
| 30 | +| 📉 **Minimum dzisiaj** | Najniższa cena dnia + godzina | |
| 31 | +| 📈 **Maksimum dzisiaj** | Najwyższa cena dnia + godzina | |
| 32 | +| 📊 **Średnia dzisiaj** | Średnia cena dnia | |
| 33 | +| 💰 **Najtańsze 3h** | Najtańsze 3 kolejne godziny | |
| 34 | +| 🏦 **Auto-kurs NBP** | Automatyczny kurs EUR/PLN z Narodowego Banku Polskiego | |
| 35 | +| 📋 **Ceny today/tomorrow** | Pełna lista cen w atrybutach sensora | |
| 36 | +| 🇵🇱 **Polski interfejs** | Pełne tłumaczenie na język polski | |
| 37 | +| 🌍 **60+ stref** | Wszystkie europejskie bidding zones | |
| 38 | + |
| 39 | +## 📦 Instalacja |
| 40 | + |
| 41 | +### HACS (zalecane) |
| 42 | + |
| 43 | +1. Otwórz **HACS → Integracje** |
| 44 | +2. Kliknij **⋮** → **Repozytoria niestandardowe** |
| 45 | +3. Dodaj URL: `https://github.com/GregECAT/entsoe-e` |
| 46 | +4. Kategoria: **Integracja** |
| 47 | +5. Zainstaluj **ENTSO-E Ceny Energii** |
| 48 | +6. Uruchom ponownie Home Assistant |
| 49 | + |
| 50 | +### Ręcznie |
| 51 | + |
| 52 | +1. Skopiuj folder `custom_components/entsoe_prices/` do katalogu `custom_components/` w Home Assistant |
| 53 | +2. Uruchom ponownie Home Assistant |
| 54 | + |
| 55 | +## ⚙️ Konfiguracja |
| 56 | + |
| 57 | +<p align="center"> |
| 58 | + <img src="images/icon.png" alt="ENTSO-E Ceny Energii icon" width="80"> |
| 59 | +</p> |
| 60 | + |
| 61 | +1. **Settings → Devices & Services → Add Integration** |
| 62 | +2. Wyszukaj **"ENTSO-E Ceny Energii"** |
| 63 | +3. Wypełnij formularz: |
| 64 | + |
| 65 | +| Pole | Opis | Domyślnie | |
| 66 | +|------|------|-----------| |
| 67 | +| 🔑 **Klucz API** | Token z [ENTSO-E](https://transparency.entsoe.eu/myAccount/webApiAccess) | — (wymagany) | |
| 68 | +| 🌍 **Strefa cenowa** | Bidding zone | 🇵🇱 Polska | |
| 69 | +| 💱 **Waluta** | EUR lub PLN | PLN | |
| 70 | +| ⚡ **Jednostka** | kWh lub MWh | kWh | |
| 71 | +| 🧾 **VAT (%)** | Stawka VAT | 23.0 | |
| 72 | +| 🏦 **Auto-kurs NBP** | Automatyczny kurs walut | ✅ Tak | |
| 73 | +| 📝 **Kurs ręczny** | Gdy auto-kurs wyłączony | 4.30 | |
| 74 | + |
| 75 | +### Jak uzyskać klucz API |
| 76 | + |
| 77 | +1. Zarejestruj konto na [transparency.entsoe.eu](https://transparency.entsoe.eu/) |
| 78 | +2. Wyślij email na `transparency@entsoe.eu` z tematem *"Restful API access"* |
| 79 | +3. Po aktywacji: **My Account → Web API Security Token** |
| 80 | + |
| 81 | +> 📖 Pełna dokumentacja API: [Postman Collection](https://documenter.getpostman.com/view/7009892/2s93JtP3F6) |
| 82 | +
|
| 83 | +## 📊 Sensory (Entities) |
| 84 | + |
| 85 | +Po konfiguracji pojawią się sensory: |
| 86 | + |
| 87 | +| Sensor | Entity ID | Opis | |
| 88 | +|--------|-----------|------| |
| 89 | +| ⚡ Aktualna cena | `sensor.entsoe_current_price` | Cena w bieżącej godzinie (PLN/kWh) | |
| 90 | +| ⏭️ Następna godzina | `sensor.entsoe_next_hour_price` | Cena na kolejną godzinę | |
| 91 | +| 📉 Minimum | `sensor.entsoe_today_min` | Najniższa cena dnia | |
| 92 | +| 📈 Maksimum | `sensor.entsoe_today_max` | Najwyższa cena dnia | |
| 93 | +| 📊 Średnia | `sensor.entsoe_today_avg` | Średnia cena dnia | |
| 94 | +| 💰 Najtańsze 3h | `sensor.entsoe_cheapest_hours_avg` | Najtańsze 3 kolejne godziny | |
| 95 | + |
| 96 | +### Atrybuty sensora `current_price` |
| 97 | + |
| 98 | +```yaml |
| 99 | +prices_today: |
| 100 | + - start: "2025-01-15T00:00:00+01:00" |
| 101 | + end: "2025-01-15T01:00:00+01:00" |
| 102 | + start_local: "00:00" |
| 103 | + value: 0.4523 # PLN/kWh |
| 104 | + raw_eur_mwh: 78.50 # oryginalna cena EUR/MWh |
| 105 | + - ... |
| 106 | +prices_tomorrow: [...] # Dostępne ok. 13:00 CET |
| 107 | +tomorrow_available: true |
| 108 | +exchange_rate: 4.3215 # kurs NBP |
| 109 | +updated_at: "2025-01-15T12:30:00+00:00" |
| 110 | +today_min: 0.2105 |
| 111 | +today_max: 0.8734 |
| 112 | +today_avg: 0.4521 |
| 113 | +today_min_hour: "03:00" |
| 114 | +today_max_hour: "18:00" |
| 115 | +cheapest_hours_start: "02:00" |
| 116 | +cheapest_hours_end: "05:00" |
| 117 | +cheapest_hours_avg: 0.2234 |
| 118 | +``` |
| 119 | +
|
| 120 | +## 📈 Wizualizacja — przykłady kart Lovelace |
| 121 | +
|
| 122 | +### ApexCharts Card |
| 123 | +
|
| 124 | +```yaml |
| 125 | +type: custom:apexcharts-card |
| 126 | +header: |
| 127 | + title: ⚡ Ceny energii — dzisiaj |
| 128 | + show: true |
| 129 | +graph_span: 24h |
| 130 | +span: |
| 131 | + start: day |
| 132 | +series: |
| 133 | + - entity: sensor.entsoe_current_price |
| 134 | + data_generator: | |
| 135 | + return entity.attributes.prices_today.map(p => [ |
| 136 | + new Date(p.start).getTime(), |
| 137 | + p.value |
| 138 | + ]); |
| 139 | +``` |
| 140 | +
|
| 141 | +### Mini Graph Card |
| 142 | +
|
| 143 | +```yaml |
| 144 | +type: custom:mini-graph-card |
| 145 | +entities: |
| 146 | + - sensor.entsoe_current_price |
| 147 | +name: Cena energii |
| 148 | +hours_to_show: 24 |
| 149 | +points_per_hour: 1 |
| 150 | +line_color: "#00CCAA" |
| 151 | +``` |
| 152 | +
|
| 153 | +### Automatyzacja — najtańsze godziny |
| 154 | +
|
| 155 | +```yaml |
| 156 | +automation: |
| 157 | + - alias: "Włącz ładowanie w najtańszych godzinach" |
| 158 | + trigger: |
| 159 | + - platform: time |
| 160 | + at: sensor.entsoe_cheapest_hours_avg |
| 161 | + condition: |
| 162 | + - condition: numeric_state |
| 163 | + entity_id: sensor.entsoe_current_price |
| 164 | + below: 0.30 |
| 165 | + action: |
| 166 | + - service: switch.turn_on |
| 167 | + target: |
| 168 | + entity_id: switch.charger |
| 169 | +``` |
| 170 | +
|
| 171 | +## 🔄 Aktualizacja danych |
| 172 | +
|
| 173 | +| Co | Częstotliwość | |
| 174 | +|----|---------------| |
| 175 | +| Ceny day-ahead | Co 30 minut | |
| 176 | +| Kurs NBP | Raz dziennie | |
| 177 | +| Ceny na jutro | Publikowane ok. 13:00 CET | |
| 178 | +
|
| 179 | +## 🤝 Wsparcie |
| 180 | +
|
| 181 | +- 🐛 **Błędy**: [GitHub Issues](https://github.com/GregECAT/entsoe-e/issues) |
| 182 | +- 🏠 **Smarting HOME**: [smartinghome.pl](https://smartinghome.pl) |
| 183 | +- 📖 **API Docs**: [Postman Collection](https://documenter.getpostman.com/view/7009892/2s93JtP3F6) |
| 184 | +- 📧 **ENTSO-E**: [transparency@entsoe.eu](mailto:transparency@entsoe.eu) |
| 185 | +
|
| 186 | +## 📄 Licencja |
| 187 | +
|
| 188 | +MIT License — [LICENSE](LICENSE) |
| 189 | +
|
| 190 | +--- |
| 191 | +
|
| 192 | +<p align="center"> |
| 193 | + <strong>Powered by <a href="https://smartinghome.pl">Smarting HOME</a></strong><br> |
| 194 | + <em>Dane z <a href="https://transparency.entsoe.eu/">ENTSO-E Transparency Platform</a> · Kurs walut z <a href="https://api.nbp.pl/">API NBP</a></em> |
| 195 | +</p> |
0 commit comments