TPLink phantom entity

A TPLink wifi outlet was renamed in order to repurpose it. While the device sets up within the Kasa app it does not appear as an entity within HA. There is an entity that has switch.name of the previous entity but it is greyed out in the entities list and refuses to be deleted because there is no “unique id.” However the attributes list shows the correct unique ID. The device also is not present in the TPLink integration list of devices. I thought that I might just remove the TPLink integration but that does not seem to be an option. It is probably a native integration in HA. Searching the core.device_registry and the core.entity_registry fails to find an entity so named.

Update:

Now I have discovered an automation that shares the same name as the entity in question. I have attempted to rename the automation and while the yaml shows the name as edited, the automations list still shows the old name. Changing the file name of the automations.yaml file caused the ‘configuration check’ to fail which was expected. A new automations.yaml file with only a single comment line satisfied the ‘configuration check’ but after restart the automations list was not empty as expected but had a single entry which was the automation in question.
Somehow i have an entity and an automation which share the same name which do not exist in the appropriate system files. Where oh where is HA loading these from? I wouldn’t be over concerned except that this stuck entity is preventing the legitimate device from showing up in HA.