Skip to content

[codex] Use tariff-specific MPSC PSCR factors#2

Merged
javaDevJT merged 6 commits into
masterfrom
enhancement/rider-18-export-rates
May 11, 2026
Merged

[codex] Use tariff-specific MPSC PSCR factors#2
javaDevJT merged 6 commits into
masterfrom
enhancement/rider-18-export-rates

Conversation

@javaDevJT

@javaDevJT javaDevJT commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary

Adds Rider 18 export-rate support matching DTE's Rider 18 spreadsheet math, with tariff-specific PSCR factors sourced dynamically from the MPSC DTE electric rate-book PDF.

  • Calculates non-net-metering export credits as parsed generation components plus the selected tariff's MPSC PSCR factor.
  • Parses PSCR factors for all tariff rows in C8.5 of the MPSC DTE electric rate book: https://www.michigan.gov/-/media/Project/Websites/mpsc/consumer/rate-books/electric/dte/dtee1cur.pdf.
  • Preserves net-metering behavior by using the full import-equivalent rate.
  • Exposes selected PSCR, selected PSCR rate code, PSCR source URL, and the parsed pscr_rates map on export entity attributes.
  • Adds calculator, MPSC PSCR PDF parser, config-flow, and sensor coverage plus in-repo research notes.

Closes #1.

D1.11 Validation

Using live DTE PDF generation components and PSCR 1.877¢/kWh from the MPSC C8.5 summary row for D1.11 Standard TOU, calculated export credits match the Rider 18 workbook values exactly:

Period Calculated Workbook
Summer Off-Peak 10.586¢/kWh 10.586¢/kWh
Summer On-Peak 16.284¢/kWh 16.284¢/kWh
Winter Off-Peak 10.586¢/kWh 10.586¢/kWh
Winter On-Peak 12.196¢/kWh 12.196¢/kWh

Validation

  • pytest -q -> 33 passed
  • python -m compileall -q custom_components tests
  • git diff --check

Notes

The repository does not have an origin/main branch. The feature branch was rebased onto the freshly fetched default branch, origin/master, and this PR targets master.

@javaDevJT javaDevJT linked an issue May 11, 2026 that may be closed by this pull request
@javaDevJT javaDevJT changed the title [codex] Add Rider 18 export rate support [codex] Calculate Rider 18 export from rate card May 11, 2026
@javaDevJT javaDevJT changed the title [codex] Calculate Rider 18 export from rate card [codex] Match Rider 18 export spreadsheet formula May 11, 2026
@javaDevJT javaDevJT changed the title [codex] Match Rider 18 export spreadsheet formula [codex] Source Rider 18 PSCR from MPSC rate book May 11, 2026
@javaDevJT javaDevJT changed the title [codex] Source Rider 18 PSCR from MPSC rate book [codex] Use tariff-specific MPSC PSCR factors May 11, 2026
@javaDevJT
javaDevJT marked this pull request as ready for review May 11, 2026 16:25
@javaDevJT
javaDevJT merged commit 216b1ba into master May 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rider 18 rates

1 participant