mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Use common strings for Harmony config flow (#41094)
* Use common strings for harmony component * Update homeassistant/components/harmony/strings.json Co-authored-by: springstan <46536646+springstan@users.noreply.github.com> * use default key for common config flow strings Co-authored-by: springstan <46536646+springstan@users.noreply.github.com>
This commit is contained in:
parent
ed867955f4
commit
01e47a977b
@ -87,7 +87,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
friendly_name = discovery_info[ssdp.ATTR_UPNP_FRIENDLY_NAME]
|
friendly_name = discovery_info[ssdp.ATTR_UPNP_FRIENDLY_NAME]
|
||||||
|
|
||||||
if self._host_already_configured(parsed_url.hostname):
|
if self._host_already_configured(parsed_url.hostname):
|
||||||
return self.async_abort(reason="already_configured")
|
return self.async_abort(reason="already_configured_device")
|
||||||
|
|
||||||
# pylint: disable=no-member
|
# pylint: disable=no-member
|
||||||
self.context["title_placeholders"] = {"name": friendly_name}
|
self.context["title_placeholders"] = {"name": friendly_name}
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"cannot_connect": "Failed to connect, please try again",
|
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]",
|
||||||
"unknown": "Unexpected error"
|
"unknown": "[%key:common::config_flow::error::unknown%]"
|
||||||
},
|
},
|
||||||
"abort": {
|
"abort": {
|
||||||
"already_configured": "Device is already configured"
|
"already_configured_device": "[%key:common::config_flow::abort::already_configured_device%]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
@ -33,4 +33,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user