diff --git a/homeassistant/components/xiaomi_miio/config_flow.py b/homeassistant/components/xiaomi_miio/config_flow.py index e35aa0c8b10..7de55835916 100644 --- a/homeassistant/components/xiaomi_miio/config_flow.py +++ b/homeassistant/components/xiaomi_miio/config_flow.py @@ -66,6 +66,11 @@ class XiaomiMiioFlowHandler(config_entries.ConfigFlow, domain=DOMAIN): await self.async_set_unique_id(unique_id) self._abort_if_unique_id_configured({CONF_HOST: self.host}) + # pylint: disable=no-member # https://github.com/PyCQA/pylint/issues/3167 + self.context.update( + {"title_placeholders": {"name": f"Gateway {self.host}"}} + ) + return await self.async_step_gateway() # Discovered device is not yet supported diff --git a/homeassistant/components/xiaomi_miio/strings.json b/homeassistant/components/xiaomi_miio/strings.json index 0024ffdfe9b..171e358c90e 100644 --- a/homeassistant/components/xiaomi_miio/strings.json +++ b/homeassistant/components/xiaomi_miio/strings.json @@ -1,5 +1,6 @@ { "config": { + "flow_title": "Xiaomi Miio: {name}", "step": { "user": { "title": "Xiaomi Miio", @@ -10,7 +11,7 @@ }, "gateway": { "title": "Connect to a Xiaomi Gateway", - "description": "You will need the API Token, see https://www.home-assistant.io/integrations/vacuum.xiaomi_miio/#retrieving-the-access-token for instructions.", + "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.", "data": { "host": "[%key:common::config_flow::data::ip%]", "token": "API Token", diff --git a/homeassistant/components/xiaomi_miio/translations/en.json b/homeassistant/components/xiaomi_miio/translations/en.json index 49c5c683993..008a68ff577 100644 --- a/homeassistant/components/xiaomi_miio/translations/en.json +++ b/homeassistant/components/xiaomi_miio/translations/en.json @@ -1,5 +1,6 @@ { "config": { + "flow_title": "Xiaomi Miio: {name}", "abort": { "already_configured": "Device is already configured", "already_in_progress": "Config flow for this Xiaomi Miio device is already in progress." @@ -15,7 +16,7 @@ "name": "Name of the Gateway", "token": "API Token" }, - "description": "You will need the API Token, see https://www.home-assistant.io/integrations/vacuum.xiaomi_miio/#retrieving-the-access-token for instructions.", + "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.", "title": "Connect to a Xiaomi Gateway" }, "user": { @@ -27,4 +28,4 @@ } } } -} \ No newline at end of file +}