New API support - bosch-thermostat/home-assistant-bosch-custom-component GitHub Wiki
Reasoning
Since 0.18 version of component (which is compatible only with HA 2022.6 and newer) there is new api introduced which is used only for gather statistics. Home Assistant in normal usage wants to get "current" entity state and it's HA job to calculate past stats. Unfortunately Bosch API gives only past data (for most devices hourly past data, for EasyControl some only day past data).
In standard "version" I used to put last hour as current state of sensor, so in reality it was one hour shifted or full day shifted in Easycontrol. In "new api version" component fetches data from Bosch API and put it directly into statistics table into database.
It has some disadvantages as those data could be used only by Energy dashboard panel (or energy graphs).
If you have bosch statistic data you'd want to preserve, follow this guide first https://github.com/bosch-thermostat/home-assistant-bosch-custom-component/wiki/Move-from-0.17-to-0.18-with-new-statistics
Configuration
To enable new API go to Settings -> Devices & Services -> find Bosch and click Configure.
Enable Recording
or Energy
(depends of device you have) sensor you want to gather statistic.
If new API is working state of sensor entities would change from to -17
.
Now go to Settings -> Dashboards -> Energy and set up Gas consumption.
External statistics has :
instead of .
as entities and names begins with Stats ...
.
Choose stats you'd want to display. Important note! It's impossible yet to keep track of costs with external statistics!
It would look like this:
Now go to Energy dashboard and look at gathered data
New API data can be used only by Energy dashboard!