How to add manually values to a sensor (to cover the past quarter with data)?

I have a sensor for the oilconsumption per day of the central heating.

That gets the data from a device that measures the oil flow.

But now I want to add values of the past. I would like to add those 100 values or so even manually like

30.1.2024 12:00 4.5

I have no clue how to achieve that except a script snippet should be able to do that if I change the code line for every day which would be easy.

thanks a lot for your support !

That is not easy at all, and not what HA is designed for. Start here if you really want to proceed:

Look at the Spook integration.

1 Like

Is there a better way if I would use an input helper to add the missing data of the past quarter or so ?

I just need an easy soultion and not a general one that should last ffor years.

thanks

No, it’s not designed to work like that. You’re editing the database to inject old data.

And how can I change the values of a sensor datapoint like in this case where there had been a measurement error cause it went up from 2,7 to 3000 Liter a day ?

Is there a way to delete such datapoint or replace it with 3 instead of 3000 ?

Thanks

Yes. Start with the database link above and learn how to query and update the database with SQL.

if there is no other way then it is not wortht the time right now cause I simply delete the sensor and start from scratch again.

It does not make sense to me for such a “simple task” to dive into sql and database when I would need that just 1 time.

But now I am more aware that many things are missing like time based helpers for example that measure the duration.

Try Developer Tools → Statistics → Find sensor and click the slope icon to the right. This might be able to correct a single or few wrong datapoints.
To import past data into the database Spook is probably still the easiest way.

I have tried the developer tools before but these sensors have no such icon. So no chance.

I know Spook but only as an app for audio books so far which had irritated me. Found it in the HACS repository and will have a look soon cause right now the system is backing up before installing the current upgrade and restart

Thanks a lot.

You need the documentation to Spook to use it.
It is an advanced tool!

I started reading in the documentation from about to features to helpers but helpers was tiny and nothing is showing a hint to edit or change values.

Where do I have to look?
I have started here

Spoook helped me to remove dead sensors and persons from my dashboard so it helped me out.
That’s why I wanted to learn more and solve the core issue this journey had started with.
thanks

There is a link on the page I linked to earlier.
https://spook.frenck.dev/

1 Like

thanks again.
I had seen that before, but when I started digging into it I had started at github readme .
This one here you entioned earlier looks far more promising.