diff --git a/homeassistant/components/xiaomi_miio/config_flow.py b/homeassistant/components/xiaomi_miio/config_flow.py index 6a62fbead13..6ebb50cd7ce 100644 --- a/homeassistant/components/xiaomi_miio/config_flow.py +++ b/homeassistant/components/xiaomi_miio/config_flow.py @@ -111,7 +111,7 @@ class XiaomiMiioFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): }, ) - errors["base"] = "connect_error" + errors["base"] = "cannot_connect" if self.host: schema = vol.Schema(GATEWAY_SETTINGS) diff --git a/homeassistant/components/xiaomi_miio/strings.json b/homeassistant/components/xiaomi_miio/strings.json index cc032a341e9..68536de76e5 100644 --- a/homeassistant/components/xiaomi_miio/strings.json +++ b/homeassistant/components/xiaomi_miio/strings.json @@ -11,7 +11,7 @@ }, "gateway": { "title": "Connect to a Xiaomi Gateway", - "description": "You will need the 32 character API Token, see https://www.home-assistant.io/integrations/vacuum.xiaomi_miio/#retrieving-the-access-token for instructions. Please note, that this token is different from the key used by the Xiaomi Aqara integration.", + "description": "You will need the 32 character [%key:common::config_flow::data::api_token%], see https://www.home-assistant.io/integrations/vacuum.xiaomi_miio/#retrieving-the-access-token for instructions. Please note, that this [%key:common::config_flow::data::api_token%] is different from the key used by the Xiaomi Aqara integration.", "data": { "host": "[%key:common::config_flow::data::ip%]", "token": "[%key:common::config_flow::data::api_token%]", @@ -20,7 +20,7 @@ } }, "error": { - "connect_error": "[%key:common::config_flow::error::cannot_connect%]", + "cannot_connect": "[%key:common::config_flow::error::cannot_connect%]", "no_device_selected": "No device selected, please select one device." }, "abort": { diff --git a/tests/components/xiaomi_miio/test_config_flow.py b/tests/components/xiaomi_miio/test_config_flow.py index d620e739e18..d8ddd657efc 100644 --- a/tests/components/xiaomi_miio/test_config_flow.py +++ b/tests/components/xiaomi_miio/test_config_flow.py @@ -90,7 +90,7 @@ async def test_config_flow_step_gateway_connect_error(hass): assert result["type"] == "form" assert result["step_id"] == "gateway" - assert result["errors"] == {"base": "connect_error"} + assert result["errors"] == {"base": "cannot_connect"} async def test_config_flow_gateway_success(hass):