Skip to content

Instantly share code, notes, and snippets.

@Lewa-Reka
Last active April 30, 2025 12:16
Show Gist options
  • Save Lewa-Reka/86244f2e0e59a119dd35e92af66e6fd2 to your computer and use it in GitHub Desktop.
Save Lewa-Reka/86244f2e0e59a119dd35e92af66e6fd2 to your computer and use it in GitHub Desktop.
sensor:
- platform: rest
name: RCE Cena Energii Teraz
unique_id: rce_energy_price_now
resource: "https://api.raporty.pse.pl/api/rce-pln"
scan_interval: 300
params:
"$first": 1
"$select": "rce_pln"
"$filter": "udtczas ge %27{{ now().strftime('%Y-%m-%d %H:%M') }}%27"
unit_of_measurement: "PLN/MWh"
value_template: "{{ value_json.value[0].rce_pln }}"
icon: mdi:cash
state_class: measurement
- platform: rest
name: RCE Cena Energii Następna Godzina
unique_id: rce_energy_price_next_hour
resource: "https://api.raporty.pse.pl/api/rce-pln"
scan_interval: 300
params:
"$first": 1
"$select": "rce_pln"
"$filter": "udtczas ge %27{{ (now()+timedelta(hours=1)).strftime('%Y-%m-%d %H:%M') }}%27"
unit_of_measurement: "PLN/MWh"
value_template: "{{ value_json.value[0].rce_pln }}"
icon: mdi:cash
- platform: rest
name: RCE Cena Energii za 2 godziny
unique_id: rce_energy_price_next_2_hours
resource: "https://api.raporty.pse.pl/api/rce-pln"
scan_interval: 300
params:
"$first": 1
"$select": "rce_pln"
"$filter": "udtczas ge %27{{ (now()+timedelta(hours=2)).strftime('%Y-%m-%d %H:%M') }}%27"
unit_of_measurement: "PLN/MWh"
value_template: "{{ value_json.value[0].rce_pln }}"
icon: mdi:cash
- platform: rest
name: RCE Cena Energii Poprzednia Godzina
unique_id: rce_energy_price_last_hour
resource: "https://api.raporty.pse.pl/api/rce-pln"
scan_interval: 300
params:
"$first": 1
"$select": "rce_pln"
"$filter": "udtczas ge %27{{ (now()+timedelta(hours=-1)).strftime('%Y-%m-%d %H:%M') }}%27"
unit_of_measurement: "PLN/MWh"
value_template: "{{ value_json.value[0].rce_pln }}"
icon: mdi:cash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment