Switch ld2410_ble to use no_devices_found (#88270)

This commit is contained in:
J. Nick Koston 2023-02-16 15:52:57 -06:00 committed by GitHub
parent a059cd7f80
commit 2ce631733a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 4 deletions

View file

@ -93,7 +93,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
self._discovered_devices[discovery.address] = discovery
if not self._discovered_devices:
return self.async_abort(reason="no_unconfigured_devices")
return self.async_abort(reason="no_devices_found")
data_schema = vol.Schema(
{

View file

@ -16,7 +16,6 @@
"not_supported": "Device not supported",
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
"no_unconfigured_devices": "No unconfigured devices found.",
"no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]"
}
}

View file

@ -60,7 +60,7 @@ async def test_user_step_no_devices_found(hass: HomeAssistant) -> None:
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
assert result["type"] == FlowResultType.ABORT
assert result["reason"] == "no_unconfigured_devices"
assert result["reason"] == "no_devices_found"
async def test_user_step_no_new_devices_found(hass: HomeAssistant) -> None:
@ -81,7 +81,7 @@ async def test_user_step_no_new_devices_found(hass: HomeAssistant) -> None:
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
assert result["type"] == FlowResultType.ABORT
assert result["reason"] == "no_unconfigured_devices"
assert result["reason"] == "no_devices_found"
async def test_user_step_cannot_connect(hass: HomeAssistant) -> None: