Renaming devices/entities without updating automations/scripts/scenes/groups

I noticed that if you rename an entity, all connections to that entity within automations get renamed automatically. This is nice for just renaming entities, but I want to swap some devices around, and intend to replace a device and have it take over the same entity IDs. Is there a way to change the entity while keeping all the links within automations the same?

Nope…

So I must be hallucinating. I do avoid using devices themselves within automation. All of my automations refer to entity IDs. I could’ve sworn the last time I tried renaming a device (and all of its entities along with it), the entity ID within the automation changed with it, but I just tested it and it seems like the automation did lose connection with the entity… so disregard I guess…