Skip to content

Instantly share code, notes, and snippets.

View moorgrove's full-sized avatar

Andreas Hedlund moorgrove

View GitHub Profile
friendly_name: Nordpool Data Struct
region: SE3
additional_costs_current_hour: 0
price_in_cents: false
unit: kWh
currency: SEK
country: Sweden
average: 0.9765
off_peak_1: 0.3272
off_peak_2: 0.6484
friendly_name: Nordpool Data Struct
region: SE3
additional_costs_current_hour: 0
price_in_cents: false
unit: kWh
currency: SEK
country: Sweden
average: 1.885
off_peak_1: 1.095
off_peak_2: 1.053
- trigger:
- trigger: time_pattern
minutes: /15
- trigger: homeassistant
event: start
action:
- action: nordpool.get_prices_for_date
data:
config_entry: YOUR_ID
date: "{{ now().date() }}"
@moorgrove
moorgrove / Action_response from nordpool.get_prices_for_date
Created October 10, 2025 14:48
Action_response from nordpool.get_prices_for_date
{% set action_response = {"SE3":[{"start":"2025-10-09T22:00:00+00:00","end":"2025-10-09T22:15:00+00:00","price":55.15},{"start":"2025-10-09T22:15:00+00:00","end":"2025-10-09T22:30:00+00:00","price":54.93},{"start":"2025-10-09T22:30:00+00:00","end":"2025-10-09T22:45:00+00:00","price":54.82},{"start":"2025-10-09T22:45:00+00:00","end":"2025-10-09T23:00:00+00:00","price":35.59},{"start":"2025-10-09T23:00:00+00:00","end":"2025-10-09T23:15:00+00:00","price":24.94},{"start":"2025-10-09T23:15:00+00:00","end":"2025-10-09T23:30:00+00:00","price":24.06},{"start":"2025-10-09T23:30:00+00:00","end":"2025-10-09T23:45:00+00:00","price":23.73},{"start":"2025-10-09T23:45:00+00:00","end":"2025-10-10T00:00:00+00:00","price":24.28},{"start":"2025-10-10T00:00:00+00:00","end":"2025-10-10T00:15:00+00:00","price":16.37},{"start":"2025-10-10T00:15:00+00:00","end":"2025-10-10T00:30:00+00:00","price":17.03},{"start":"2025-10-10T00:30:00+00:00","end":"2025-10-10T00:45:00+00:00","price":16.81},{"start":"2025-10-10T00:45:00+00:00","end":"2
# Paste in "raw configuration editor" that you access thru the three dots in the upper right corner in the Home Assistant dashboard.
apexcharts_card_templates:
electricity_price:
locale: sv
apex_config:
legend:
show: false
xaxis:
labels:
# See https://gist.github.com/moorgrove/d43b27ee789d4e91f2070953ec00bd58 for gist regarding "config_templates: electricity_price"
type: custom:apexcharts-card
config_templates: electricity_price
now:
show: true
label: Nu
color: '#ffc0cb'
header:
show: true
type: custom:apexcharts-card
now:
show: true
label: Nu
color: '#ffc0cb'
header:
show: true
title: Elpris Import | 2 Dagar
show_states: true
colorize_states: true