Add ability to ignore rachio discovery (#34649)
* Add ability to ignore rachio discovery * update test * Update tests/components/rachio/test_config_flow.py Co-Authored-By: Chris Talkington <chris@talkingtontech.com> * Update tests/components/rachio/test_config_flow.py Co-Authored-By: Chris Talkington <chris@talkingtontech.com> Co-authored-by: Chris Talkington <chris@talkingtontech.com>
This commit is contained in:
1 parent
0d700f6a63
commit
c4c2b4f9da
2 files changed
+16
-2
No files matched your search
@@ -111,16 +111,26 @@ async def test_form_homekit(hass):
|
||||
await setup.async_setup_component(hass, "persistent_notification", {})
|
||||
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": "homekit"}
|
||||
DOMAIN,
|
||||
context={"source": "homekit"},
|
||||
data={"properties": {"id": "AA:BB:CC:DD:EE:FF"}},
|
||||
)
|
||||
assert result["type"] == "form"
|
||||
assert result["errors"] == {}
|
||||
flow = next(
|
||||
flow
|
||||
for flow in hass.config_entries.flow.async_progress()
|
||||
if flow["flow_id"] == result["flow_id"]
|
||||
)
|
||||
assert flow["context"]["unique_id"] == "AA:BB:CC:DD:EE:FF"
|
||||
|
||||
entry = MockConfigEntry(domain=DOMAIN, data={CONF_API_KEY: "api_key"})
|
||||
entry.add_to_hass(hass)
|
||||
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN, context={"source": "homekit"}
|
||||
DOMAIN,
|
||||
context={"source": "homekit"},
|
||||
data={"properties": {"id": "AA:BB:CC:DD:EE:FF"}},
|
||||
)
|
||||
assert result["type"] == "abort"
|
||||
assert result["reason"] == "already_configured"
|
||||
Reference in new issue
Block a user