1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Give users a hint that their bluetooth adapter has been ignored (#87727)

This commit is contained in:
J. Nick Koston
2023-02-09 16:41:53 -06:00
committed by GitHub
parent cbaf4764e7
commit 4cebc767b5
3 changed files with 26 additions and 2 deletions

View File

@@ -394,3 +394,21 @@ async def test_options_flow_enabled_linux(
response = await ws_client.receive_json()
assert response["result"][0]["supports_options"] is True
await hass.config_entries.async_unload(entry.entry_id)
async def test_async_step_user_linux_adapter_is_ignored(hass, one_adapter):
"""Test we give a hint that the adapter is ignored."""
entry = MockConfigEntry(
domain=DOMAIN,
unique_id="00:00:00:00:00:01",
source=config_entries.SOURCE_IGNORE,
)
entry.add_to_hass(hass)
result = await hass.config_entries.flow.async_init(
DOMAIN,
context={"source": config_entries.SOURCE_USER},
data={},
)
assert result["type"] == FlowResultType.ABORT
assert result["reason"] == "no_adapters"
assert result["description_placeholders"] == {"ignored_adapters": "1"}