diff --git a/homeassistant/components/deako/strings.json b/homeassistant/components/deako/strings.json index 1b4f6d6081d1..088e85a726d2 100644 --- a/homeassistant/components/deako/strings.json +++ b/homeassistant/components/deako/strings.json @@ -1,7 +1,6 @@ { "config": { "abort": { - "no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]", "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" }, "step": { diff --git a/homeassistant/components/escea/strings.json b/homeassistant/components/escea/strings.json index 0b9fcacbb7ad..83e561d467d9 100644 --- a/homeassistant/components/escea/strings.json +++ b/homeassistant/components/escea/strings.json @@ -1,7 +1,6 @@ { "config": { "abort": { - "no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]", "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" }, "step": { diff --git a/homeassistant/components/fjaraskupan/strings.json b/homeassistant/components/fjaraskupan/strings.json index 9f02109dcf63..70343f151df1 100644 --- a/homeassistant/components/fjaraskupan/strings.json +++ b/homeassistant/components/fjaraskupan/strings.json @@ -1,7 +1,6 @@ { "config": { "abort": { - "no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]", "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" }, "step": { diff --git a/homeassistant/components/govee_light_local/strings.json b/homeassistant/components/govee_light_local/strings.json index afa664d1ae04..18873d294a51 100644 --- a/homeassistant/components/govee_light_local/strings.json +++ b/homeassistant/components/govee_light_local/strings.json @@ -1,7 +1,6 @@ { "config": { "abort": { - "no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]", "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" }, "step": { diff --git a/homeassistant/components/gree/strings.json b/homeassistant/components/gree/strings.json index cbf1cef49405..1a68177c6bb9 100644 --- a/homeassistant/components/gree/strings.json +++ b/homeassistant/components/gree/strings.json @@ -1,7 +1,6 @@ { "config": { "abort": { - "no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]", "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" }, "step": { diff --git a/homeassistant/components/hisense_aehw4a1/strings.json b/homeassistant/components/hisense_aehw4a1/strings.json index f69e25cf356d..c29a0fb6ce68 100644 --- a/homeassistant/components/hisense_aehw4a1/strings.json +++ b/homeassistant/components/hisense_aehw4a1/strings.json @@ -1,7 +1,6 @@ { "config": { "abort": { - "no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]", "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" }, "step": { diff --git a/homeassistant/components/homeassistant/strings.json b/homeassistant/components/homeassistant/strings.json index 78ceec20a2fb..39470f45edd8 100644 --- a/homeassistant/components/homeassistant/strings.json +++ b/homeassistant/components/homeassistant/strings.json @@ -4,6 +4,7 @@ "authorize_url_timeout": "[%key:common::config_flow::abort::oauth2_authorize_url_timeout%]", "cloud_not_connected": "[%key:common::config_flow::abort::cloud_not_connected%]", "missing_credentials": "[%key:common::config_flow::abort::oauth2_missing_credentials%]", + "no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]", "no_url_available": "[%key:common::config_flow::abort::oauth2_no_url_available%]", "oauth_error": "[%key:common::config_flow::abort::oauth2_error%]", "oauth_failed": "[%key:common::config_flow::abort::oauth2_failed%]", diff --git a/homeassistant/components/refoss/strings.json b/homeassistant/components/refoss/strings.json index 461313b563e0..3eaf68565423 100644 --- a/homeassistant/components/refoss/strings.json +++ b/homeassistant/components/refoss/strings.json @@ -1,7 +1,6 @@ { "config": { "abort": { - "no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]", "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" }, "step": { diff --git a/homeassistant/components/sonos/strings.json b/homeassistant/components/sonos/strings.json index 82c99a7e1d23..b17818ddc3cb 100644 --- a/homeassistant/components/sonos/strings.json +++ b/homeassistant/components/sonos/strings.json @@ -1,7 +1,6 @@ { "config": { "abort": { - "no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]", "not_ipv4_address": "No IPv4 address in SSDP discovery information", "not_sonos_device": "Discovered device is not a Sonos device", "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" diff --git a/homeassistant/components/wemo/strings.json b/homeassistant/components/wemo/strings.json index 77a1507cee6b..874f4633c214 100644 --- a/homeassistant/components/wemo/strings.json +++ b/homeassistant/components/wemo/strings.json @@ -1,7 +1,6 @@ { "config": { "abort": { - "no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]", "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" }, "step": { diff --git a/homeassistant/components/zerproc/strings.json b/homeassistant/components/zerproc/strings.json index 2e8312544e71..7b2ae512458d 100644 --- a/homeassistant/components/zerproc/strings.json +++ b/homeassistant/components/zerproc/strings.json @@ -1,7 +1,6 @@ { "config": { "abort": { - "no_devices_found": "[%key:common::config_flow::abort::no_devices_found%]", "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]" }, "step": { diff --git a/homeassistant/helpers/config_entry_flow.py b/homeassistant/helpers/config_entry_flow.py index 9255db6fbd7f..c46188a32950 100644 --- a/homeassistant/helpers/config_entry_flow.py +++ b/homeassistant/helpers/config_entry_flow.py @@ -73,7 +73,10 @@ class DiscoveryFlowHandler[_R: Awaitable[bool] | bool](config_entries.ConfigFlow has_devices = await cast("asyncio.Future[bool]", discovery_result) if not has_devices: - return self.async_abort(reason="no_devices_found") + return self.async_abort( + reason="no_devices_found", + translation_domain=HOMEASSISTANT_DOMAIN, + ) # Cancel the discovered one. for flow in in_progress: diff --git a/tests/helpers/test_config_entry_flow.py b/tests/helpers/test_config_entry_flow.py index 649ca107c439..b03dcc0a487c 100644 --- a/tests/helpers/test_config_entry_flow.py +++ b/tests/helpers/test_config_entry_flow.py @@ -90,6 +90,7 @@ async def test_user_no_devices_found( assert result["type"] == data_entry_flow.FlowResultType.ABORT assert result["reason"] == "no_devices_found" + assert result["translation_domain"] == HOMEASSISTANT_DOMAIN async def test_user_has_confirmation(