History for meter is missing

Entity ID is still the same, history is still in database, but in the fronted, it starts only about 10 days back

Have you changed your recorder database purge_keep_days?

It is 10 days by default.

No, where can I do that?

BTW my goal is not to remove items from database, but to have longer history.

https://www.home-assistant.io/integrations/recorder/#purge_keep_days

Beware that increasing it (particularly beyond a month) can cause performance issues.

I’m even more confused “now, purge_keep_days” and data that are kept in sqlite database are different thing? Also energy dashboard has data months back - so it does have different different datasource than sqlite database?

If the recorder runs on home-assistant_v2.db — statistics it is not deleting the data, but from the entity history it seem it does delete data as it shows only 10 days back.

State history is kept for the purge keep days setting.

Long term statistics (including energy dashboard stats) are kept forever (but only at hourly resolution).

They are all kept in the same database.