mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 19:57:03 -04:00
Stop using the domain as unique ID in easyEnergy config flow (#189711)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
ae383c61ce
commit
a45281a620
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user