Skip to content

v0.4.0

Choose a tag to compare

@TrentHouliston TrentHouliston released this 07 Jun 01:29
e30a525

HAEO v0.4.0

First stable release of the 0.4 series. This is a major release that introduces the power policy pricing system, dashboard cards for forecasts and network topology, deterministic optimization, and a large internal refactor into a standalone core package.

Caution

Back up your Home Assistant configuration before upgrading. This release includes one-way schema migrations (v1.3/v1.4) that restructure element configuration data. Once migrated, you cannot downgrade back to v0.3.x without restoring a backup.

Recommended steps: Take a full Home Assistant backup, upgrade, then check Settings → Devices & Services → HAEO to verify your elements and the new Policies subentry look correct. Check the Home Assistant log for any migration warnings.

Highlights

  • Power policies — define per-source pricing rules so the optimizer distinguishes solar export earnings, battery wear costs, and grid tariffs
  • 📈 Forecast & topology Lovelace cards — visualize optimization forecasts and your energy network topology directly on your dashboard
  • 🎯 Deterministic optimization — calibrated multiobjective solver gives consistent dispatch schedules every run
  • 🔋 Sheddable loads & battery salvage value — loads can be curtailed when cost-effective; batteries value stored energy at the horizon end

⚠️ Breaking Changes

Pricing moves to power policies

Battery discharge wear costs, charge incentives, and solar production costs have moved from individual element configuration into the new Power Policy element. Existing configurations are migrated automatically (v1.3/v1.4 migrations), but verify after upgrading:

  1. Open HAEO settings and confirm the new "Policies" subentry
  2. Check that migrated rules match your previous pricing
  3. Battery charge incentive prices are negated during migration — if you used entity-based incentives, check the log for warnings

Connections are now unidirectional

Connections are explicitly directional (source → target). Bidirectional paths use two connection entries. Existing bidirectional connections are migrated automatically; verify import/export paths after upgrading.

Entity unique IDs stabilized

Entity unique IDs are normalized and duplicate section-prefixed entities are cleaned up during migration. Update any automations or dashboards that reference old entity IDs.

Shadow price units changed to $/kWh (#424)

All shadow price sensors are now reported in $/kWh instead of $/kW. Entity IDs are unchanged; dashboards, templates, and automations that assumed the old unit need updating. Shadow prices now share the same unit as import/export tariffs, so no manual conversion is needed to compare them.

User-Facing Changes

New Features

  • Power policy element — directional pricing rules with source/target matching and wildcard support (#369)
  • HAEO forecast Lovelace card — modular forecast visualization with responsive layout and paired power limits (#352, #411, #412, #414)
  • Network topology Lovelace card — interactive SVG graph of elements, connections, limits, efficiency, and policy overlays (#417, #453)
  • Sheddable loads — mark loads as curtailable so the optimizer can shed them when cost-effective (#303)
  • Battery salvage value — assign a terminal value ($/kWh) to stored energy, discouraging unnecessary end-of-horizon discharge (#302)
  • Deterministic optimization — lexicographic, blended, and calibrated solver modes for consistent dispatch every run (#301)
  • Nordpool pricing extractor — automatic extraction from Nordpool raw_today/raw_tomorrow attributes (#367)
  • Volcast solar forecast extractor — use Volcast detailedForecast data as a solar forecast input (#440)
  • Shadow prices in $/kWh — shadow price sensors use the same unit as tariffs (#424)
  • Historic diagnostics walkthrough guide — step through optimization diagnostics over time (#432)
  • Last run timestamp — optimization status sensor exposes a last_run attribute (#381)

Configuration Improvements

  • Surfaced policy pricing on element flows — set battery/load pricing directly on element config screens without opening the standalone policy flow (#430, #442)
  • Grouped UI sections — config flows organize fields into collapsible sections (#266)
  • Automatic currency detection — reads the currency from your price sensor units, falling back to HA config (#368)
  • Policy source/target filtering — the policy flow only shows elements that can actually source or sink power (#380)
  • Unit-aware entity pickers — config entity selectors filter by unit compatibility and exclude the current hub's own entities (#446)
  • Clearer battery partition names — distinct undercharge/overcharge cost and percentage labels (#428)
  • Negative price entry — PRICE inputs accept negative energy prices (#415)
  • Reactive policy pricing — policy price changes apply without rebuilding the network (#408)
  • Tier 4 horizon alignment — half-hour horizons align to the local timezone (#463)
  • Refreshed installation and comparison docs — updated installation guide and HAEO vs EMHASS comparison (#459, #464)

Bug Fixes

  • Fix optimizer crash when optional efficiency is unset or cleared (#360)
  • Fix battery power limits and efficiency segment ordering (#297)
  • Fix network period tracking across optimization runs (#295)
  • Fix recorder forecast filtering dropping valid entries (#310)
  • Fix participant name resolution after Home Assistant restart (#373)
  • Fix optimizer re-run race condition on concurrent subentry updates (#375)
  • Fix battery charge incentive price sign in migration (#376)
  • Change policy compilation from default-deny to default-allow so unpolicied flows pass freely (#379)
  • Fix policy config flow UX and endpoint restore issues (#374, #382, #383, #384)
  • Fix policy performance regression when policies are enabled (#387)
  • Stabilize entity unique IDs across config migrations (#388)
  • Fix policy and element value updates not applying (#406)
  • Fix forecast card freezes and enforce strict hub scoping (#455)
  • Fix intermittent Lovelace custom element registration race (#458)
  • Handle policy-pruned connections in element adapters (#449)
  • Scale SOC pricing cost by period duration (#439)
  • Fix migration duplicate elements (#404)
  • Remove null values from horizon sensor attributes (#348)

Developer-Facing Changes

Developer Highlights

  • Standalone core package — the model, schema, adapters, data, and context layers were extracted into a Home-Assistant-free core package, enforced by an import linter (#312#340, #320)
  • InputStore — a shared input-field layer (editable vs driven modes, time-series loading, readiness) unifies the optimization and surfaced-policy paths (#441)
  • Versioned documentation site — published at hass-energy.github.io/haeo (#390)
  • uv run sim realtime simulator — boots a browsable Home Assistant instance with time-shifted scenario inputs for local development (#444)

Architecture

  • Unidirectional connections and functional segment composition (#364)
  • Tag infrastructure and VLAN-aware min-cut policy pricing placement (#370, #393, #394, #401)
  • Topology visualization pipeline moved from matplotlib/networkx to frontend SVG rendering (#417, #453, #454)
  • Config loader routed through the coordinator (#338, #339, #342)
  • Snapshot dev tool and stabilized snapshot rounding (#403, #426)
  • Stabilized scenario optimization SVG exports (#450)

Schema/API Changes

  • v1.3 migration: typed config objects, policy restructuring, and connection split
  • v1.4 migration: policy rule enabled/price requirements and charge incentive negation (#376, #385, #399)
  • Shadow price LP formulation computed in energy-native $/kWh (#424)
  • Diagnostic schema versioning (#396, #397)

Testing & Documentation

  • Literate guide system with automated screenshot generation (#139, #345, #365)
  • Guide test reliability improvements via event-based waiting and trusted-networks auth (#447, #448)
  • Diagnostics CLI tool (#260)
  • Codecov uploads via OIDC instead of a repository token (#429)
  • CI accepts PEP 440 .post/.dev release tags and gates fork-only deploy jobs (#436)

Contributors

What's Changed

Full Changelog: v0.3.3...v0.4.0