Here’s my sequence:
Start with a working yaml file for device A.
Create a new device in ESPHome. Call this device B.
Copy the contents of device A yaml file into device B.
Changed all name references from device A to device B names.
Compile and download the yaml file for flashing to device B.
Add device B to the ESPHome configuration in HA.
Device B works fine and as expected. However some of the entities still have the name from device A.
Further, in Developer Tools → states, most of the entities are “unknown”.