Xiaomi Miio gateway: add ip to zeroconf discovery title (#36653)
* add ip to discovery title of xiaomi miio gateway * add flow title to identify multiple gateways by IP * clearify gateway token * black formatting * grammer improvements Co-authored-by: Franck Nijhof <git@frenck.dev> * grammer improvements Co-authored-by: Franck Nijhof <git@frenck.dev> Co-authored-by: Franck Nijhof <git@frenck.dev>pull/36671/head
parent
afe4647896
commit
b820b7c47d
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue