Skip to content

Ratebook v0.2.0

Latest

Choose a tag to compare

@cbetz cbetz released this 01 Jul 23:07
· 1 commit to main since this release

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): Schedule gains holidays (a closed vocabulary of 12 named US holidays, computed per-year) and holiday_observance (sunday_to_monday — the prevailing utility rule — or actual_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; also today_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 ModuleNotFoundError outside 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