iOS device renaming breaks automations

Apple never changed the way their iphones behave in certain network conditions. They randomly add a number (x) to the device name, causing it to be registered in the Mobile App Integration as a new device. So after some time you will end up with many duplicates (my_iphone, my_iphone(2), my_iphone(3) etc).

This also breaks any automation sending data to the mobile app entity (e.g. critical messages).

Proposal: The HA app should not use the device name as a primary key for registering. Instead the user should choose a device name himself upon starting the app the first time to keep the binding intact.

1 Like

Nope. Apple do not do that.

Home assistant does that when it rediscovers the same device.

The real question is, why is your phone being rediscovered?

1 Like

My Verizon router renames conflicting host names and Apple iPhone accepts them happily.
Then if the devices goes off of WiFi for a while and then comes back it seems to increment the number yet again.
I have manually renamed my iPhone not to be iPhone but my wife has not.
One of my kids has an old iPhone that I’ve failed to rename so the two of them are forever incrementing host names thanks to my router.
My computers have a similar problem when the same hostname is detected via WiFi and Ethernet.
I can’t wait to swap out my Verizon router for a UniFi Security Gateway.

Don’t get your hopes up. My son has UniFi and has exactly the same problem with his MacBook that is connected to wifi and ethernet at the same time. The network name is now numbered up into the hundreds. But this is different to the OP problem.

I have had the “_2” problem when two integrations want to give an entity the same id - for example for the Apple Cloud and Netgear integrations. Renaming to how I want them to be fixes things, and I’ve never had “_3”.

1 Like