-
-
Notifications
You must be signed in to change notification settings - Fork 6
index
github-actions edited this page Jun 9, 2026
·
2 revisions
This directory contains Architecture Decision Records (ADRs) for the HSEM project.
An Architecture Decision Record is a short document that captures an important architectural or design decision, including the context, the decision itself, the consequences, and the alternatives that were considered (and rejected). ADRs help new contributors (and future maintainers) understand why the system works the way it does — not just how.
| Convention | Rule |
|---|---|
| Naming | adr-NNN-title-with-hyphens.md |
| Status |
Accepted (retrospective decisions are marked as such) |
| Scope | One decision per ADR — no multi-decision records |
| Layout | Context → Decision → Consequences → Alternatives Considered → Related |
| Updates | When a decision changes, supersede with a new ADR (don't edit old ADRs) |
| ADR | Title | Area | Status |
|---|---|---|---|
| ADR-001 | Pure-Python Planner Extraction | Architecture, planner layer | Accepted |
| ADR-002 | Slot Model | Planner engine, data model | Accepted |
| ADR-003 | Cost Scoring Architecture | Cost function, candidate selection | Accepted |
| ADR-004 | Inverter Safety — Layered Hardware Write Protection | Safety, hardware interface | Accepted |
| ADR-005 | Forecast Confidence | Forecast handling, diagnostics | Accepted |
- Determine the next ADR number (find the highest
adr-NNNin this directory and increment). - Use the template below.
- Ensure the new ADR links to related ADRs and implementation files.
- Add it to the index table above.
# ADR-NNN: Short Title in Title Case
**Status:** [Proposed | Accepted | Deprecated | Superseded]
**Date:** YYYY-MM-DD
**Deciders:** [list of people involved]
---
## Context
What is the issue that motivated this decision? What constraints or forces are at play?
## Decision
What is the change that we're proposing and/or doing? Use clear, specific language.
### Detailed design (if applicable)
Architecture diagrams, module lists, configuration structures, or API contracts.
## Consequences
### Positive
What advantages does this decision bring?
### Negative
What trade-offs, costs, or risks does this decision introduce?
### Mitigations
How are the negative consequences addressed?
## Alternatives Considered
### Option A: [short name]
*Description of the alternative.*
**Rejected because:** [reason]
### Option B: [short name]
*Description of the alternative.*
**Rejected because:** [reason]
---
## Related
- Links to other ADRs
- Links to implementation files
- Links to GitHub issues-
docs/planner-spec.md— the canonical planner specification. ADRs explain why design decisions were made; the spec documents what the planner must do. -
docs/architecture-overview.md— high-level architecture overview. ADRs provide the reasoning behind the architecture. -
.github/memories.md— repository memory for AI agents. Key ADR conclusions are reflected there.
- 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