Naming phones / mobile devices

In short, is there a way to assign generic names to the sensors on mobile devices, such that when you get a new phone, you only need to edit the device details in one place, rather than edit every automation, etc.

Eg. rather than “device_tracker.xyz_123”, you might instead have one place where you’ve got some code that basically says “device_tracker.xyz_123” = device_tracker.my_phone

Similarly, with the phone name, can this be set somewhere, so that you never have to edit all automations that point to a phone?

I just bought a new phone and it was a pain in the ass to edit all my automations etc.

Thanks for the help

You can go to the entity in the ui and rename the entity_id there to match the old one.

This is what happens when you over think something. Thanks for the solution.

1 Like