Instead of renaming them, it is smarter to address the cause. If you set a friendly name in the esp yaml, that will be prefixed to all entities. If you do, then do not also use the name of the esp in the names of the sensors below, or you’ll get the double naming you describe. If you want to put the name in the entities themselves, don’t specify the frienly name too.
This is done so you can use similar yaml for multiple devices by just putting in a different friendly name.
If you must rename them, use the entity settings in Home Assistant GUI.
Yes, you are right. It would be better to address the cause. The problem is, that I don’t manage the code. As I understand it (which is probably flawed), I link to the manufactures packages. I only have a small “stub” in my ESPHome Builder.
While I look into the correct solution, can you give me a more detailed route to:
… use the entity settings in Home Assistant GUI.
Regards, M.
PS - I'm using:
Version core-2025.1.4
Installation type Home Assistant OS
Go to the Integrations / Devices / Entities page. Click the Entities tab header. Find the entity you’re interested in. Click the row. Click the cog icon. Edit the entity ID as needed.
Note that any hand-written YAML automations, scripts, templates etc that are using that entity will need to be updated in line.