mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00:00
Switch led_ble to use no_devices_found (#88269)
This commit is contained in:
parent
ffa7cac38e
commit
06b1bf9c92
@ -98,7 +98,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
self._discovered_devices[discovery.address] = discovery
|
self._discovered_devices[discovery.address] = discovery
|
||||||
|
|
||||||
if not self._discovered_devices:
|
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(
|
data_schema = vol.Schema(
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
"not_supported": "Device not supported",
|
"not_supported": "Device not supported",
|
||||||
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
|
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
|
||||||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
|
"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%]"
|
"no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ async def test_user_step_no_devices_found(hass: HomeAssistant) -> None:
|
|||||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||||
)
|
)
|
||||||
assert result["type"] == FlowResultType.ABORT
|
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:
|
async def test_user_step_no_new_devices_found(hass: HomeAssistant) -> None:
|
||||||
@ -85,7 +85,7 @@ async def test_user_step_no_new_devices_found(hass: HomeAssistant) -> None:
|
|||||||
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
DOMAIN, context={"source": config_entries.SOURCE_USER}
|
||||||
)
|
)
|
||||||
assert result["type"] == FlowResultType.ABORT
|
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:
|
async def test_user_step_cannot_connect(hass: HomeAssistant) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user