Utility sensor with long term statistics data

Hi.

I noticed that my utility meters are not displaying correct values/sums any more. When looking at their source sensors I noticed that at the end of July there was an event, don’t know what exactly. I think i was adding unique_id parameter to my sensors and that might trigger this? The problem is that up untill 25th of July utility meter is not seeing data, after it it is. Difference is that up untill 25th the data now states for its source as “Long term statistics” and after that it is “History”.

HA-long-term-stats

Can I make the utility meters “see” older data or how can I fix this problem? The utility meters were collecting data waaay before the july.

Thanks.

If you added a unique id, statistics may now be seeing your utility meter values as coming from a different sensor.

Have you looked through statistics in Developer Tools to see if the old ones are still there? There will probably be a message about it being an “orphaned entity” or something like that.

Edit: Apparently this does not happen if you restart immediately after adding the unique id. If you don’t, it may do. If it has happened, the entity_id will have changed to old entity id_2.

Hey, thanks for your reply. Statustics show old values ok, but again, source is long term statistics. Just can’t seem to figure this one out.