Skip to content

Conversation

@TCWORLD
Copy link
Contributor

@TCWORLD TCWORLD commented Dec 30, 2025

Proposed change

Rather than requesting power data directly from the recorder, a new web API is added to the energy integration which provides access to the power data. Update the frontend to use that.

The new API allows performing more complex operations in the backend when fetching power data. Initially this is set up to mix in long-term statistics data if short term statistics data is requested but not available due to age.

Refer to the corresponding core PR home-assistant/core#160000

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

This suggested approach also opens a future possibility to correct for power data having the wrong polarity in the future - polarity correction could be performed as part of the new API in the back-end rather than the front-end.

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@MindFreeze
Copy link
Member

Closing. See the comment on the Core PR.
You can open a new PR to merge long term stats with history on frontend if you like. Like we do for other history charts.

@MindFreeze MindFreeze closed this Jan 19, 2026
@TCWORLD TCWORLD deleted the power-statistics branch February 3, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Power Sources on Energy Dashboard missing if selected date is beyond short term statistics limit

3 participants