Dynamic load optimization using Nordpool 15-minute spot pricing
Intelligently reduce electricity consumption during price peaks while maintaining comfort and functionality. Save 10-20% on peak electricity costs.
Status: v2.0 rollout in progress on branch
release/v2.0.0. See docs updates and DP-based optimizer details in upcoming commits.
A Python-based optimization engine for Home Assistant that:
- Analyzes Nordpool 15-minute spot prices
- Finds optimal cutoff periods (when to reduce load)
- Calculates preheat and recovery phases
- Outputs schedule as Home Assistant sensors
- You integrate it with YOUR specific loads
This system can optimize any controllable electrical load:
| Load Type | Use Case | Storage Method |
|---|---|---|
| HVAC | Heat pumps, AC units | Building thermal mass |
| Water Heating | Electric boilers, heat pump water heaters | Water tank |
| EV Charging | Smart charging schedules | Battery |
| Pool/Spa | Heating and filtration | Water thermal mass |
| Industrial | Compressors, refrigeration | Process buffers |
Key requirement: Your load must tolerate short interruptions or have energy storage capacity.
βββββββββββββββ¬βββββββββββββββ¬ββββββββββββββ
β PREHEAT β CUTOFF β RECOVERY β
βββββββββββββββΌβββββββββββββββΌββββββββββββββ€
β Store β Minimize β Return to β
β energy β consumption β normal β
β (optional) β (save β¬β¬β¬) β operation β
βββββββββββββββ΄βββββββββββββββ΄ββββββββββββββ
- Preheat (optional) - Store energy before expensive period
- Cutoff - Reduce/stop load during price peaks
- Recovery - Gentle return to normal operation
The optimizer finds the globally optimal schedule using Dynamic Programming, testing 100-200 candidates per day.
- Home Assistant 2024.10+
- Nordpool HACS integration with 15-min data enabled
- Python Scripts integration (
python_script:in configuration.yaml) - Controllable load (climate entities, switches, etc.)
-
Clone this repository
cd /config/ git clone https://github.com/nikopaulanne/nordpool-spot-cutoff-optimizer.git -
Copy Python script
cp nordpool-spot-cutoff-optimizer/python_scripts/nordpool_cutoff_optimizer.py /config/python_scripts/
-
Add configuration (see Part 3 documentation)
-
Restart Home Assistant
-
Calibrate parameters (see documentation)
3-part series on Home Assistant Community:
- Part 1: Theory - Understanding the concept (using HVAC as example)
- Part 2: Cutoff Optimizer - Python implementation details
- Part 3: Integration Examples - How to integrate with YOUR system
Full documentation also available in docs/ folder.
HVAC Heating Example (Finland, October 2025):
| Date | Peak Price | Savings | Temperature Impact |
|---|---|---|---|
| Oct 1 | 36.6 c/kWh | 35.9% | < 0.3Β°C drop |
| Oct 3 | 7.66 c/kWh | 18.2% | < 0.5Β°C drop |
| Average | - | 10-20% | Minimal |
The optimizer is load-agnostic. Core parameters:
| Parameter | Default | Description |
|---|---|---|
base_price_diff |
3.5 c/kWh | Minimum price difference for 1h cutoff |
max_cutoff_duration |
4 hours | Maximum cutoff length |
preheat_temp_offset |
+1Β°C | Preheat amount (HVAC example) |
min_savings_threshold |
10% | Minimum savings to activate |
You calibrate these for YOUR specific system. See calibration guide.
nordpool-spot-cutoff-optimizer/
βββ README.md # This file
βββ docs/ # Full documentation
β βββ 01-theory.md # Conceptual background
β βββ 02-cutoff-optimizer.md # Python implementation
β βββ 03-integration-examples.md # Setup guides
βββ python_scripts/
β βββ nordpool_cutoff_optimizer.py # Core optimizer
βββ examples/
β βββ hvac/ # HVAC integration example
β βββ water_heater/ # Water heater example
β βββ ... # More examples welcome!
βββ tools/ # Calibration & analysis tools
Coming soon: Dashboard examples, results visualization
We need YOUR integration examples!
If you've successfully implemented this for:
- Different heating/cooling systems
- Industrial equipment
- Smart home devices
- Other creative uses
Please share! Submit a PR with:
- Your configuration files
- A README explaining your setup
- (Optional) Results/screenshots
See CONTRIBUTING.md for guidelines.
MIT License - see LICENSE file
This is a scheduling optimizer only. YOU are responsible for:
- β Safe implementation for your equipment
- β Respecting manufacturer guidelines
- β Testing thoroughly before production use
- β Monitoring system behavior
- β Ensuring comfort and safety
The authors assume no liability for equipment damage or comfort issues.
- Home Assistant community for feedback and testing
- Nordpool integration developers
- All contributors sharing integration examples
- Issues: GitHub Issues
- Discussion: Home Assistant Community Forum
- Documentation: See
docs/folder
β If this project helps you save energy, please star the repository!
π¬ Share your results and setup in the discussions!