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/36673/head
parent
4c139076ef
commit
c2a261370e
|
@ -66,6 +66,11 @@ class XiaomiMiioFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||||
await self.async_set_unique_id(unique_id)
|
await self.async_set_unique_id(unique_id)
|
||||||
self._abort_if_unique_id_configured({CONF_HOST: self.host})
|
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()
|
return await self.async_step_gateway()
|
||||||
|
|
||||||
# Discovered device is not yet supported
|
# Discovered device is not yet supported
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"config": {
|
"config": {
|
||||||
|
"flow_title": "Xiaomi Miio: {name}",
|
||||||
"step": {
|
"step": {
|
||||||
"user": {
|
"user": {
|
||||||
"title": "Xiaomi Miio",
|
"title": "Xiaomi Miio",
|
||||||
|
@ -10,7 +11,7 @@
|
||||||
},
|
},
|
||||||
"gateway": {
|
"gateway": {
|
||||||
"title": "Connect to a Xiaomi 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": {
|
"data": {
|
||||||
"host": "[%key:common::config_flow::data::ip%]",
|
"host": "[%key:common::config_flow::data::ip%]",
|
||||||
"token": "API Token",
|
"token": "API Token",
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"config": {
|
"config": {
|
||||||
|
"flow_title": "Xiaomi Miio: {name}",
|
||||||
"abort": {
|
"abort": {
|
||||||
"already_configured": "Device is already configured",
|
"already_configured": "Device is already configured",
|
||||||
"already_in_progress": "Config flow for this Xiaomi Miio device is already in progress."
|
"already_in_progress": "Config flow for this Xiaomi Miio device is already in progress."
|
||||||
|
@ -28,4 +29,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue