Releases: cbetz/ratebook
Releases · cbetz/ratebook
Release list
Ratebook v0.2.0
The trust release: every Home Assistant-bundled tariff audited against the utility's current rate sheet (July 2026) — and the bundle doubles to 30 plans, including EV rates.
Added
- Holiday-aware pricing (Python + TypeScript, held together by new shared vectors):
Schedulegainsholidays(a closed vocabulary of 12 named US holidays, computed per-year) andholiday_observance(sunday_to_monday— the prevailing utility rule — oractual_day). TOU plans whose rate sheets price holidays off-peak now do. - HA: tier selection — tiered plans (PG&E, SCE, ConEd…) price at the usage tier you pick (baseline vs above-baseline differs 25-50% on some plans); the active tier is a sensor attribute.
- HA: Nordpool-compatible attributes — timezone-aware
raw_today/raw_tomorrow([{start, end, value}]) +tomorrow_valid: true, so existing cheapest-hours automations, blueprints, and ApexCharts configs work as a drop-in swap; alsotoday_is_holiday/tomorrow_is_holiday. - HA: config-flow UX — the tariff dropdown shows human labels ("PG&E — E-1 Tiered (CA)"); custom tariff JSON gets a multiline field; bulky schedule attributes are excluded from the recorder.
- Bundle: 15 → 30 audited plans. Only 3 of 28 audited tariffs were fully accurate; the rest had drifted rates, stale adjustors, missing riders, or structural gaps — all corrected with per-file
source_documents+last_verified. New: TOU companions for nearly every bundled utility, PECO Rate R + TOU, the default CA TOU plans (PG&E E-TOU-C, SCE TOU-D-4-9PM), and hand-authored, adversarially verified EV plans: PG&E EV2-A, SCE TOU-D-PRIME, SDG&E EV-TOU-5. - Runtime HA test suite (pytest-homeassistant-custom-component) covering the config flow, sensors, and setup/unload — plus a subprocess test that imports the vendored tree with the workspace package blocked, reproducing a real install.
- Docs: Energy Dashboard setup guide (verified live end-to-end), tariff authoring guide, request-a-utility issue template, honest comparison vs ha-openei / MIDAS / ComEd / Emporia.
Fixed
- Vendored-import bug that broke real installs (caught by adversarial review before shipping): an absolute engine import wasn't rewritten by the vendoring script, raising
ModuleNotFoundErroroutside the monorepo. The rewriter now handles every form, and CI proves it. - Independent verification corrections: PSE&G RS gains the ZEC credit (−$0.004265/kWh), Con Edison SC-1 entries gain the GR 26 RDM + CESD adders (+$0.007581/kWh), SCE Domestic D's unverifiable adj was zeroed to match SCE's published tier prices.
- Negative tier indexes clamp safely in both engines; TypeScript rejects unknown holiday names at parse time, matching Python.
Full changelog: https://github.com/cbetz/ratebook/blob/main/CHANGELOG.md
Ratebook v0.1.0
First tagged release of Ratebook — the open rate engine for the electrified home.
What's in it
- Deterministic rate engine (Python + a TypeScript port held to it byte-for-byte by shared vectors), cross-validated against NREL's PySAM. Prices flat/tiered/seasonal/TOU residential tariffs; "unknown" is a typed refusal, never a wrong number.
- v0 tariff dataset — 65 engine-validated tariffs across 37 US utilities / 26 states + DC, URDB-derived and CC0, with provenance + confidence per record (
packages/ratebook-data/dataset/). - MCP server — 4 tools (
lookup_tariff,estimate_bill,compare_plans,best_charge_window). - Home Assistant integration — live price + cheapest-charge-window sensors, self-contained (no PyPI/network deps), with a 'pick your utility' bundle of 15 plans + a reconfigure flow. HACS mirror: cbetz/ratebook-homeassistant.
- Accuracy scorecard — published golden-set eval (
docs/GOLDEN_SET.md).
Code Apache-2.0; published data CC0-1.0 (derives from the CC0 U.S. Utility Rate Database).