mirror of
https://github.com/Legolas-2025/EPrices.git
synced 2026-08-17 12:34:51 +02:00
Add negative price provider fee support in v1.1
Added support for negative price provider fees, configurable via secrets.yaml. Updated price calculation formulas and modified eprices.yaml for new global and substitutions.
This commit is contained in:
+48
-2
@@ -1,4 +1,50 @@
|
||||
# EPrices v1.0 – Changelog
|
||||
# EPrices – Changelog
|
||||
|
||||
## v1.1 — 2026-04-06
|
||||
|
||||
### Negative price provider fee support
|
||||
|
||||
Added a separate provider fee multiplier for negative spot prices, configurable
|
||||
via `secrets.yaml`. This correctly models contracts where the provider fee
|
||||
structure differs between positive and negative market prices.
|
||||
|
||||
**New secret key:**
|
||||
|
||||
```yaml
|
||||
eprices_neg_prov_fee: "0.30"
|
||||
```
|
||||
|
||||
**New global:** `neg_prov_fee` (type: `double`)
|
||||
|
||||
**Price calculation is now:**
|
||||
|
||||
| Market price | Formula |
|
||||
|---|---|
|
||||
| Positive (`raw_mwh >= 0`) | `(raw / 1000) × (1 + prov_fee) × (1 + vat_rate)` |
|
||||
| Negative (`raw_mwh < 0`) | `(raw / 1000) × (1 - neg_prov_fee) × (1 + vat_rate)` |
|
||||
|
||||
**Key values for `eprices_neg_prov_fee`:**
|
||||
|
||||
| Value | Meaning |
|
||||
|---|---|
|
||||
| `"0.30"` | Provider keeps 30%, pays you 70% of negative price |
|
||||
| `"0.00"` | Provider passes full negative price to you (no fee) |
|
||||
|
||||
**Switch point:** raw API price (`raw_mwh`) before any multiplier is applied.
|
||||
|
||||
**VAT:** applied symmetrically to both positive and negative prices, consistent
|
||||
with net billing models where VAT is calculated on the monthly net sum
|
||||
(mathematically equivalent due to VAT being a linear multiplier).
|
||||
|
||||
**Changed files:** `eprices.yaml`, `secrets.yaml`
|
||||
|
||||
**Changed locations in `eprices.yaml`:**
|
||||
- `substitutions:` — added `neg_prov_fee_value`
|
||||
- `globals:` — added `neg_prov_fee`
|
||||
- `parse_energy_charts_today_script` — `MULT` split into `MULT_POS` / `MULT_NEG`
|
||||
- `parse_energy_charts_tomorrow_script` — `MULT` split into `MULT_POS` / `MULT_NEG`
|
||||
|
||||
---
|
||||
|
||||
## v1.0 — 2026-04-05
|
||||
|
||||
@@ -126,4 +172,4 @@ eprices_vat_rate # e.g. "0.22" (VAT rate as decimal multiplier)
|
||||
- **Tomorrow Data Loaded Time** shows `Outside fetch window` when device boots before 13:20
|
||||
- **API fetch times** reset to `Never` at midnight bridge and on `clear_tomorrow_prices`
|
||||
- **API fetch attempt counters** reset to `0` at midnight and publish `0` immediately on boot
|
||||
- **Uptime** displayed as human-readable string: `45 s` / `5 min` / `3 h 22 min` / `12 d 4 h` / `4 months 12 d`
|
||||
- **Uptime** displayed as human-readable string: `45 s` / `5 min` / `3 h 22 min` / `12 d 4 h` / `4 months 12 d`
|
||||
|
||||
Reference in New Issue
Block a user