-
-
Notifications
You must be signed in to change notification settings - Fork 6
price scaling
github-actions edited this page Jun 9, 2026
·
3 revisions
This document explains how HSEM handles the interaction between Energi Data Service (EDS) price update intervals and planning slot widths.
HSEM supports two independent interval settings:
| Setting | Values | What it controls |
|---|---|---|
energi_data_service_update_interval |
15 or 60 minutes | How often EDS publishes price records |
recommendation_interval_minutes |
15 or 60 minutes | The width of each planning slot |
When these differ (most commonly: EDS 60 min, slots 15 min), the price rate must be correctly scaled so the planner always sees the full currency/kWh rate.
| EDS interval | Slot width | eds_share |
Effect |
|---|---|---|---|
| 60 min | 15 min | 4.0 | Price ÷ 4 stored; planner gets price × 4 back |
| 15 min | 15 min | 1.0 | No scaling |
| 60 min | 60 min | 1.0 | No scaling |
flowchart TD
A[EDS raw price P\nfull hourly currency per kWh]
B[HourlyDataPopulator._async_update_hourly_field]
C[Recommendation slot storage\nHourlyRecommendation objects]
D[coordinator._build_planner_input]
E[Planner engine PricePoint\nimport_price = P]
A --> B
B -->|Per-slot stored value = P / eds_share| C
C --> D
D -->|Planner input value = stored value × eds_share = P| E
-
eds_shareis not a VAT multiplier -
eds_shareis not a currency conversion -
eds_shareis not an energy-splitting factor (prices are rates, not energy)
For any configuration:
- A 60-min EDS price of
Pmust reach the planner asP(notP/4orP*4) - A 15-min EDS price of
Pmust reach the planner asP - Intermediate per-slot stored values must equal
P / eds_share - Changing
energi_data_service_update_intervalfrom 60 to 15 with the same price input must not change the price seen by the planner engine - Negative prices must survive the full pipeline unchanged (no absolute-value clipping, no zero-flooring)
For horizons beyond 24 hours, prices and PV data are projected onto the shared time-series index per calendar day:
| Field | Source | Day offset |
|---|---|---|
| Today's prices | Live EDS sensor | day_offset = 0 |
| Tomorrow's prices | EDS tomorrow sensor | day_offset = 1 |
| Day+2 prices | EDS day+2 sensor | day_offset = 2 |
Missing future-day data is surfaced in DataQuality as:
tomorrow_price_missing_hoursday2_price_missing_hourstomorrow_pv_missing_hoursday2_pv_missing_hours
Non-critical missing data triggers Degraded mode (writes allowed).
- Home — User-facing overview: features, FAQ, working modes, battery schedules, excess export, consumption sensors
- Battery Charging Economics — How to calculate the minimum charging price for a battery schedule
- Architecture Overview — System context, layered architecture, module map, planning pipeline
- Planner Specification — Normative — all planner invariants, rules, and constraints
- Planner Technical Guide — How the planner works with worked examples
- Cost Function Math — Complete mathematical formulation of the 8-term cost function
- Energy Accounting — Physical energy flow model, SoC simulation, efficiency math
- Candidate Generation — How candidates are generated, assumptions, partial-SoC
- MILP Optimization — Full LP formulation, variable layout, constraints, and solver pipeline
- Consumption Prediction — Weighted-average model, IQR outlier detection, spike suppression
- Safety Modes — Degraded mode, read-only gate, write-verify applier, runtime resolver
- Price Scaling — EDS price scaling, eds_share conversion factor
- Services Reference — All 4 HSEM services with examples
- Sensors Reference — Complete entity reference: all sensor, select, switch, number, and time entities
- Dashboard Setup — Step-by-step ApexCharts dashboard with full YAML, layout reference, and troubleshooting
- Config Flow Reference — Every config/options flow step and field
- EV Charge Plan Setup — EV planned load configuration guide
- EV Surplus Charging Automation — Wire your physical EV charger (go-e, Easee, Zaptec) to follow HSEM surplus recommendations
- EV Optimal Charging Template — Legacy Home Assistant template sensor for cost-optimal EV charging
- Forecast Accuracy Tracking — Forecast vs actual tracking system
- Huawei Entities — Canonical HA entity ID reference
- Troubleshooting Guide — Diagnose and fix common problems: missing data, wrong prices, write failures, battery behaviour
- Quality Checks — Static quality tools and CI configuration