fix(energy): align energy_totals with PR 321's trimmed SSE payload - #17
Conversation
product_type/topic/url are dropped from the wire event and isCache is now optional-true only, matching the convention already used by live_status/site_info/tariff_content_v2.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf1bd1673e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| never staleness; there is no snapshot-on-connect delivery. This | ||
| listener only exposes the totals. |
There was a problem hiding this comment.
Remove the obsolete URL instructions from the README
When users consult the public API documentation, README.md lines 170-173 and 312-313 still say that energy_totals carries a url that they should GET. The trimmed event no longer contains that field, and this listener exposes only the totals, so those instructions cannot be followed; update both README passages to omit the URL or name the REST endpoint directly.
AGENTS.md reference: AGENTS.md:L13-L13
Useful? React with 👍 / 👎.
Intent
energy_totalswith Teslemetry/api PR 321, which trimmed the SSE event payload.id,createdAt, andtotalson the event, plusisCacheonly whentrue-product_type,topic, andurlwere dropped as redundant with the event's own topic name and site id.listen_EnergyTotalsfilters onid/totalsinstead ofid/product_type/topic;Key.PRODUCT_TYPE/Key.TOPIC/Key.URLstay inconst.pyfor other event kinds, just unused by this path now.tests/test_energysite_events.pyfixtures updated to the trimmed shape.energy_totalsis effectively zero since feat(energy): add typed energy_totals listener for calendar_history refreshes #15 landed, so no deprecation path needed.