iOS integration merged 2 devices following upgrade

After upgrading my old iPhone 6 to a new one, I am seeing double battery level and state under the same device.

Originally right after the migration both devices had the same name, I changed the new one hoping they would separate…

reset definitions on the iOS app for both devices,

Tried to modify known_devices.yaml, ios.conf files…

(also removed core.device_registry in the storage folder - I guess I am not supposed to do that)

Nothing helps…

any idea how to put the device registry & integration in order ?

You should edit the /home/pi/.homeassistant/.storage/core.entity_registry file.

         {
            "config_entry_id": "xxxxxxxxxxxxxxxxxxx",
            "device_id": "xxxxxxxxxxxxxxxxxxx",
            "disabled_by": null,
            "entity_id": "sensor.iphone_battery_state",
            "name": null,
            "platform": "ios",
            "unique_id": "state_xxxxxxxxxxxxx"
        },
        {
            "config_entry_id": "xxxxxxxxxxxxxxx",
            "device_id": "xxxxxxxxxxxxxxxxxxxxxxx",
            "disabled_by": null,
            "entity_id": "sensor.iphone_battery_level",
            "name": null,
            "platform": "ios",
            "unique_id": "level_xxxxxxxxxxxxx"
        },

If you have something like: "entity_id": "sensor.iphone_battery_level_2",you can delete the _2` part if you want.

And also edit the /home/pi/.homeassistant\.ios.conf file and get rid of your old phone.

If you are unsure what you are doing this might damage your hass install, a fair warning. But it should be pretty forward.

1 Like

For the iPhone I don’t have device with “_2” in the entity registery
but I do have entities that have the older iphone name associated with the new device ID.

I tried to remove these 2 entities (no longer care about the battery level of the older device) - but after restart they reappeared in entity registry for some reason - what is causing them to appear there ?

BTW
I ended up deleting storage folder & IOS conf :grimacing:

Had to reconfigure some things - but it looks better now
hope I didn’t miss any component / config - I guess time will tell

Glad I could have helped.

Hi, I had the same thing in the hassio build.
The paths are different:

/config/.ios.conf
/config/.storage/core.entity_registry

In the ‘Home Assistant iOS’ Integration the battery level and battery state entities are still there after editing the two files, but they are labeled: entity unavailable

What else to edit?

Thanks so far!

Looked like the two enitities were back in ./config/.storage/core.entity_registry
After deleting those again, restarting hassio, now it looks good.
They do not appear in the integration of iOS and not in the core.entity_registry.

This is how it should be.

Regards
Erik