From a45281a62097e5dfd4e18594403620f8bf6f7a91 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Sat, 31 Oct 2026 15:22:41 +0100 Subject: [PATCH] Stop using the domain as unique ID in easyEnergy config flow (#189711) Co-authored-by: Claude --- homeassistant/components/easyenergy/config_flow.py | 3 --- homeassistant/components/easyenergy/strings.json | 3 --- tests/components/easyenergy/test_config_flow.py | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/homeassistant/components/easyenergy/config_flow.py b/homeassistant/components/easyenergy/config_flow.py index 5020cc78b2a3..40c48e269223 100644 --- a/homeassistant/components/easyenergy/config_flow.py +++ b/homeassistant/components/easyenergy/config_flow.py @@ -23,9 +23,6 @@ class EasyEnergyFlowHandler(ConfigFlow, domain=DOMAIN): """Handle the initial step.""" errors: dict[str, str] = {} - await self.async_set_unique_id(DOMAIN) - self._abort_if_unique_id_configured() - if user_input is not None: easyenergy = EasyEnergy(session=async_get_clientsession(self.hass)) today = dt_util.now().date() diff --git a/homeassistant/components/easyenergy/strings.json b/homeassistant/components/easyenergy/strings.json index 24d820b2c514..2f52467c9fab 100644 --- a/homeassistant/components/easyenergy/strings.json +++ b/homeassistant/components/easyenergy/strings.json @@ -1,8 +1,5 @@ { "config": { - "abort": { - "already_configured": "[%key:common::config_flow::abort::already_configured_device%]" - }, "error": { "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]" }, diff --git a/tests/components/easyenergy/test_config_flow.py b/tests/components/easyenergy/test_config_flow.py index a83d75d0b28e..e58edf804a93 100644 --- a/tests/components/easyenergy/test_config_flow.py +++ b/tests/components/easyenergy/test_config_flow.py @@ -37,7 +37,7 @@ async def test_full_user_flow( assert result2.get("type") is FlowResultType.CREATE_ENTRY assert result2.get("title") == "easyEnergy" assert result2.get("data") == {} - assert result2["result"].unique_id == DOMAIN + assert result2["result"].unique_id is None assert mock_easyenergy.energy_prices.call_count == 1 assert len(mock_setup_entry.mock_calls) == 1