From 9859f32f9182fd94135e7c18db19ef3a70eb7fca Mon Sep 17 00:00:00 2001 From: G Johansson Date: Tue, 14 Apr 2026 20:01:42 +0000 Subject: [PATCH] Mods --- homeassistant/components/min_max/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/min_max/__init__.py b/homeassistant/components/min_max/__init__.py index a864d4f4fa8f..51ea03491f26 100644 --- a/homeassistant/components/min_max/__init__.py +++ b/homeassistant/components/min_max/__init__.py @@ -55,8 +55,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: entity_reg.async_update_entity_platform( old_entity, GROUP_DOMAIN, new_config_entry_id=new_config_entry.entry_id ) - - await hass.config_entries.async_add(new_config_entry) + # If entity is not existing, it has already been migrated + # and we should not create it again + await hass.config_entries.async_add(new_config_entry) async def remove_old_entry(now: datetime) -> None: """Remove the old config entry after migration."""