diff --git a/homeassistant/config_entries.py b/homeassistant/config_entries.py index f1748c6b7fb..57b9765eb87 100644 --- a/homeassistant/config_entries.py +++ b/homeassistant/config_entries.py @@ -35,6 +35,7 @@ from .const import ( CONF_NAME, EVENT_HOMEASSISTANT_STARTED, EVENT_HOMEASSISTANT_STOP, + PATCH_VERSION, Platform, ) from .core import ( @@ -1483,6 +1484,19 @@ class ConfigEntriesFlowManager( result["handler"], flow.unique_id ) + if existing_entry is not None and PATCH_VERSION == "0.dev0": + # We temporarily restrict this to `dev` to get a feel for how many + # integrations this concerns + report_usage( + "creates a config entry when another entry with the same unique ID " + "exists, causing the old entry to be removed and replaced when it " + "should most likely update the previous entry and abort the flow", + core_behavior=ReportBehavior.LOG, + core_integration_behavior=ReportBehavior.LOG, + custom_integration_behavior=ReportBehavior.IGNORE, + exclude_integrations={"mobile_app"}, + ) + # Unload the entry before setting up the new one. # We will remove it only after the other one is set up, # so that device customizations are not getting lost.