This blueprint uses the custom nordpool integration and let's you choose how many hours you will define as cheap, on what day, sequential/not sequential hours, on what time and make automations based on that information.
NB! This works on 15min and 1hour prices.
Let's you choose sensor and enities.
- Time range filtering: Set start and end times to only search for cheap hours within a specific window (e.g., 06:00-22:00).
- Weekday selection: Choose which days of the week to run automations.
- Flexible thresholds: Define how many hours should be considered "cheap".
- Auto-scaling: Automatically handles both hourly (24 prices) and 15-minute (96 prices) Nordpool data.
- Open yaml file from this repo and copy address
- Open HA Settings > Automation and Scenes > Blueprints > Import blueprint
- Paste previously copied address and import
This blueprint requires the Nordpool custom integration to be installed and configured in Home Assistant.
The blueprint expects your Nordpool sensor (e.g., sensor.nordpool_kwh_ee_eur_3_10_022) to provide these attributes:
Core attributes:
current_price(float): Current electricity price for the active time slot - Right now as 12.10.2025 current price does not return correct price on 15min prices.today(list): Array of 24 hourly prices OR 96 quarter-hour prices for todayraw_today(list): Detailed price data with timestamps for today (each entry hasstart,end,value)raw_tomorrow(list): Detailed price data for tomorrow (available after ~13:00 CET, empty[]before that)
Additional metadata attributes:
unit(string): Price unit, e.g.,"kWh"currency(string): Currency code, e.g.,"EUR","SEK"country(string): Country name, e.g.,"Estonia"region(string): Grid region code, e.g.,"EE","SE3"price_in_cents(boolean): Whether prices are in cents/öre (true) or full currency unitsaverage,min,max,mean(floats): Statistical summary of the day's pricestomorrow_valid(boolean): Whether tomorrow's prices are available yet
Example sensor state structure:
state: 24.401 # Current price (same as current_price attribute)
attributes:
current_price: 24.401
unit: kWh
currency: EUR
country: Estonia
region: EE
price_in_cents: true
unit_of_measurement: c/kWh
# Price statistics
average: 11.946
min: 1.347
max: 35.864
mean: 8.856
# Today's prices (96 values = 15-minute slots, OR 24 values = hourly)
today:
- 8.955
- 8.741
- 6.832
- 6.831
# ... 92 more values for 15-min (or 20 more for hourly)
# Detailed today prices with timestamps
raw_today:
- start: "2025-10-10T00:00:00+03:00"
end: "2025-10-10T00:15:00+03:00"
value: 8.955
- start: "2025-10-10T00:15:00+03:00"
end: "2025-10-10T00:30:00+03:00"
value: 8.741
# ... continues for all 96 slots (or 24 for hourly)
# Tomorrow's prices (empty until ~13:00, then populated)
tomorrow: []
raw_tomorrow: []
tomorrow_valid: falseData formats:
- Hourly mode: 24 prices in
todayarray (one per hour, 00:00-23:00)raw_todayhas 24 entries with 1-hour intervals (e.g., 00:00:00 → 01:00:00)
- 15-minute mode: 96 prices in
todayarray (four per hour, 00:00-23:45)raw_todayhas 96 entries with 15-minute intervals (e.g., 00:00:00 → 00:15:00)
- The blueprint auto-detects the format by checking
todayarray length
Important notes:
- Prices in
todayarray are ordered chronologically (index 0 = first slot of the day) raw_today/raw_tomorrowinclude ISO 8601 timestamps with timezone (e.g.,+03:00)- The blueprint uses
raw_*attributes first (most accurate timestamp matching), falls back totodayindex calculation - Tomorrow's prices (
raw_tomorrow,tomorrow) become available around 13:00-14:00 CET each day tomorrow_valid: falseindicates tomorrow's data is not yet available- Each
raw_todayentry usesvaluefield (notprice) for the price amount
The blueprint has three action inputs:
- Cheap action: Runs when inside time window AND current price ≤ threshold
- Expensive action: Runs when inside time window AND current price > threshold
When you configure start and end times (e.g., 21:00:00 to 23:00:00):
Inside the time window (21:00-23:00):
- Prices are compared to the threshold calculated from that window
- If current price ≤ threshold → "Cheap" action runs (turn on device)
- If current price > threshold → "Expensive" action runs (turn off device)
Example use case:
- Time range:
21:00:00to23:00:00 - Cheap hours:
2 - Cheap action: Turn on heater
- Expensive action: Turn off heater
- Result: Heater turns on during the 2 cheapest 15-minute slots between 21:00-23:00, then automatically turns off at 23:00 and stays off until 21:00 the next day
- May find more hours than set if hours are not sequential and next price is same as ending price.
- Add sequential hours.

