Long Term Statistics erased

I was replacing an old Centralite ZigBee Temp/Humidity Sensor with a new one. I delete the old one. I added the new one and gave it the same name as the old one. All seemed fine. Then I realized that I had lost my Long Term Statistics. Everything before exactly 5pm that day was gone. Weeks of data apparently deleted. Maybe a coincidence but I was changing the ZigBee sensor right around 5pm.

Anyone else ever experience a loss of their Long Term Statistics?

Thanks, Mike

Hey Mike –

It’s unclear (to me at least); did you lose long term statistics for all devices or long term statistics for the device you deleted?

All devices. Like the Long Term Statistics database was wiped at 5pm and started fresh.

Ouch! That’s what I was hoping you wouldn’t say!

Sorry man, hopefully someone more knowledgeable can chime in … I’m not even seeing an easy way to manually remove the long term stats, so you may have found a bug or some funky edge case.

Might be worth a shot just in case your browser is caching some filter or something: Try another browser or incognito mode to ensure it still isn’t showing.

For me, I take nightly backups of the VM and HASS itself triggers backups to my NAS a few times a week, so I’d probably roll back to whichever is more recent if I lost that data :-\

There was an issue with renaming devices that causes database corruption.

A fix was merged into 2024.3.1. What version were you on when this renaming occured?

tjhart85 - I had only started using HA a few months ago, so not too much data lost. Good advice re setting up backups. I have a NAS running and will set something up.

tom_l - I upgraded to 2024.3.1 after this problem occurred, so maybe this was it.

Thanks all, Mike