From 6c2901077857a89f8ff3ad50756e11fa70113a29 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sat, 1 Mar 2025 12:09:59 +0100 Subject: [PATCH] Add blog post for config_entry unique_id collision warning (#2467) * Add blog post for config_entry unique_id collision warning * Update and rename 2024-11-22-config-flow-unique-id to 2024-11-22-config-flow-unique-id.md * Update 2024-11-22-config-flow-unique-id.md * Rename 2024-11-22-config-flow-unique-id.md to 2024-12-19-config-flow-unique-id.md * Adjust date * Rename 2025-01-16-config-flow-unique-id.md to 2025-03-01-config-flow-unique-id.md --- blog/2025-03-01-config-flow-unique-id.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 blog/2025-03-01-config-flow-unique-id.md diff --git a/blog/2025-03-01-config-flow-unique-id.md b/blog/2025-03-01-config-flow-unique-id.md new file mode 100644 index 00000000..00da1883 --- /dev/null +++ b/blog/2025-03-01-config-flow-unique-id.md @@ -0,0 +1,15 @@ +--- +author: epenet +authorURL: https://github.com/epenet +title: "New checks for config flow unique ID" +--- + +### Summary of changes + +When a config flow creates an entry with a colliding unique ID, the old entry is currently automatically removed and replaced with the new config entry. +This can lead to unexpected behavior, and integrations should be adjusted to instead abort the flow. + +In case of manual flows, integrations should implement options, reauth, reconfigure to allow the user to change settings. +In case of non user visible flows, the integration should optionally update the existing entry before aborting. + +More details can be found in the [config flow](/docs/config_entries_config_flow_handler#unique-id-requirements) documentation.