Implement an elegant way to populate history from the sensor's code

Ehlo,

Here is the target issue: the Linky component (currently broken) uses an API that doesn’t allow real-time access to the value of the sensor. Instead all you can access is the history of the value for each half-hours as recent as the previous day. While wanting to interface with the utility meter there are only one way: do an ugly hack to present the yesterday data in function of the time. This makes impossible any correlation of data afterwards or to have correct monthly bills.

Another example of the issue: The MiFlora defices are battery powered. Each request takes a bit of energy. That is why it is adviced to have a low polling frequency. That results in poor temporal resolution in graphs and a lot of energy waste. The offical app however can access a low energy log and therefore get data with a good resolution in one request.


The request is as follow: create a new API in the recorder/sensor components that allows a sensor to add entries in its past state.

I am willing to code it myself but I prefer to have some guidance to do that properly as well as validation of the core team before I get to work.

Thanks for your attention.