Stop using the domain as unique ID in easyEnergy config flow (#189711)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Joost Lekkerkerker
2026-10-31 10:22:41 -04:00
committed by GitHub
co-authored by Claude
parent ae383c61ce
commit a45281a620
3 changed files with 1 additions and 7 deletions
@@ -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()
@@ -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%]"
},
@@ -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