Got rid of solar inverter. Can I remove the integration without losing history?

https://community.home-assistant.io/t/repurpose-esphome-device-keeping-the-old-device-entities-with-history/1020523/5?u=tom_l