Skip to content

Improve energy sensors data handling and statistics reliability#553

Open
maczet wants to merge 1 commit intobosch-thermostat:masterfrom
maczet:master
Open

Improve energy sensors data handling and statistics reliability#553
maczet wants to merge 1 commit intobosch-thermostat:masterfrom
maczet:master

Conversation

@maczet
Copy link
Copy Markdown

@maczet maczet commented Apr 28, 2026

Description
This PR focuses on improvements in energy sensors handling, including value processing and statistics integration.

What changed
Improved energy sensor update flow and raw value handling from API responses.
Added more robust logic for selecting and reading the correct energy attribute key.
Updated energy state assignment behavior for energy-class sensors to ensure consistent output.
Improved historical statistics ingestion for energy sensors:
better handling of missing/partial records,
safer processing of invalid values (including negative values),
clearer daily-to-hourly distribution flow used for statistics generation.
Added/expanded diagnostic metadata and logging for easier validation and troubleshooting of energy sensor values and statistics.

Why
The goal is to make energy sensor readings and long-term statistics more reliable, easier to debug, and more consistent with expected Home Assistant behavior.

Testing needed
⚠️ This solution must be tested by another person

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.

1 participant