diff --git a/homeassistant/components/onvif/config_flow.py b/homeassistant/components/onvif/config_flow.py index cbe6d03fa6..ccb301a455 100644 --- a/homeassistant/components/onvif/config_flow.py +++ b/homeassistant/components/onvif/config_flow.py @@ -262,7 +262,7 @@ class OnvifFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): return self.async_abort(reason="onvif_error") except Fault: - errors["base"] = "connection_failed" + errors["base"] = "cannot_connect" return self.async_show_form(step_id="auth", errors=errors) diff --git a/homeassistant/components/onvif/strings.json b/homeassistant/components/onvif/strings.json index 4dc411a221..dac8ef8647 100644 --- a/homeassistant/components/onvif/strings.json +++ b/homeassistant/components/onvif/strings.json @@ -1,14 +1,14 @@ { "config": { "abort": { - "already_configured": "ONVIF device is already configured.", + "already_configured": "[%key:common::config_flow::abort::already_configured_device%]", "already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]", "onvif_error": "Error setting up ONVIF device. Check logs for more information.", "no_h264": "There were no H264 streams available. Check the profile configuration on your device.", "no_mac": "Could not configure unique ID for ONVIF device." }, "error": { - "connection_failed": "Could not connect to ONVIF service with provided credentials." + "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]" }, "step": { "user": { diff --git a/tests/components/onvif/test_config_flow.py b/tests/components/onvif/test_config_flow.py index 864968f848..e54b0c7a4e 100644 --- a/tests/components/onvif/test_config_flow.py +++ b/tests/components/onvif/test_config_flow.py @@ -531,7 +531,7 @@ async def test_flow_import_onvif_auth_error(hass): assert result["type"] == data_entry_flow.RESULT_TYPE_FORM assert result["step_id"] == "auth" - assert result["errors"]["base"] == "connection_failed" + assert result["errors"]["base"] == "cannot_connect" async def test_option_flow(hass):