Entity IDs are a mess after devices names changes! How to properly change names?

I have some Tasmota plugs that I previously configured to control some equipment in my house so their entity Id was automatically generated and was, as example:

switch.stufa (stufa is italian name for “heater”)
sensor.stufa_energy_today
sensor.stufa_energy_factor
and so on…

Today I changed all the names of my plugs to better manage them on the networks since I have 12 now but will be 24 in a couple of weeks, so changed their names in the Tasmota firmware webgui, as example I changed “stufa” to “computer”.

I removed all switches and sensors from home assistant dashboards, rebooted, and something messy is happening: the devices names are displaied with the new names, but the entity ids are still the old one. I rebooted different times, no changes.
Check the screenshots at the end of this message.

Since every plug expoxes at least 10 entities, and now I have 12 of them, I would like to avoid to manually change entity ids one by one. How to perform an “automatic” change? What I did wrong?

Thanks

p.s.
I had the same issue with other devices, but I solved it removing the swtiches and sensor in the dashboards and rebooting HA, but this time not worked for those tasmota plugs.

4 posts were split to a new topic: Changing entity id gives already in use error

Tried to search for this “issue” but didnt find any other information. I will try to disable and delete the Tasmota integration and install it back, to see if it fixes the issue, but I’m sure this is not the right way to do. I will open a bug on HA, let’s see if anyone can fix this behaviour that maybe it’s a Tasmota integration issue.

Changing the name makes, for all practical purposes, a new device with a new device ID. Look for the new device in Developer Tools > States.