Switch switchbot to use no_devices_found (#88268)
parent
b2a1df19a0
commit
ffa7cac38e
|
@ -272,7 +272,7 @@ class SwitchbotConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||
self._discovered_advs[address] = parsed
|
||||
|
||||
if not self._discovered_advs:
|
||||
raise AbortFlow("no_unconfigured_devices")
|
||||
raise AbortFlow("no_devices_found")
|
||||
|
||||
async def _async_set_device(self, discovery: SwitchBotAdvertisement) -> None:
|
||||
"""Set the device to work with."""
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
},
|
||||
"abort": {
|
||||
"already_configured_device": "[%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%]",
|
||||
"unknown": "[%key:common::config_flow::error::unknown%]",
|
||||
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
|
||||
"switchbot_unsupported_type": "Unsupported Switchbot Type."
|
||||
|
|
|
@ -249,7 +249,7 @@ async def test_user_setup_wohand_already_configured(hass: HomeAssistant) -> None
|
|||
DOMAIN, context={"source": SOURCE_USER}
|
||||
)
|
||||
assert result["type"] == FlowResultType.ABORT
|
||||
assert result["reason"] == "no_unconfigured_devices"
|
||||
assert result["reason"] == "no_devices_found"
|
||||
|
||||
|
||||
async def test_user_setup_wocurtain(hass: HomeAssistant) -> None:
|
||||
|
@ -662,7 +662,7 @@ async def test_user_no_devices(hass: HomeAssistant) -> None:
|
|||
DOMAIN, context={"source": SOURCE_USER}
|
||||
)
|
||||
assert result["type"] == FlowResultType.ABORT
|
||||
assert result["reason"] == "no_unconfigured_devices"
|
||||
assert result["reason"] == "no_devices_found"
|
||||
|
||||
|
||||
async def test_async_step_user_takes_precedence_over_discovery(
|
||||
|
|
Loading…
Reference in New Issue