Map entity to alias

I have a load of automations that use my phone - tracking, charging or not as conditions, battery level, send HA notfications to, etc.

If I change my phone (which I’m about to do) I then need to update all these automations to use the new device. Multiply this by others in the household also changing their device and it becomes a pain.

Is there any way to perhaps “map” a real device to some kind of helper which inherits the original devices entities/sensors, etc. I can then use the pseudo-entities in automations, etc and if I change my phone only have to update the original device for the helper?

You have two options:

Option 1 is the easy way out and is a short term fix. Simply set the new phone name in the companion app to be the same as the old phone name when setting it up.
Your phone entities will derive their name from the device name and you won’t need to change any automations.

Option 2 is slightly more involved, but more future proof. When adding the new phone, make sure the device name is something more generic (like “Nick phone”), instead of the phone’s model. You’ll have to edit your automations* once, but it’s a one time job.

*It’s a 2 minute job to rename if you open up automations.yaml and do a search & replace, provided you don’t let a typo slip in :wink:

I’ve run into the same issue with phone changes messing up my automations. What works for me is setting up a virtual or “dummy” device in Home Assistant. I link all my automations to this virtual device instead of the actual phone. That way, if you change phones, you only need to update the virtual device’s settings rather than every single automation. It saves a ton of time and keeps everything running smoothly.

@enry86cami That’s exactly what I was trying to do. How did you set that up originally?