Cleaning up my energy dashboard without loosing data

Throughout the months I have added many devices to my energy dashboard. Some of them don’t exist any more, some of them got renamed, for some of them I changed integration. All of them have in common that the energy entity does not exist any more.

So I have a huge ton of “Entity not defined. Check the integration or your configuration that provides: …” error messages. However, despite the missing entity, the statistics still show the historic data.

I do not want to loose any historic data hence I was afraid removing these entries from the energy dashboard. But I really would like.

Does deleting such entities from the energy dashboard remove historic data/statistics or are they preserved? Can I safely remove them while still keeping my historic data/statistics?