mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Use common strings in emulated roku (#41745)
* Use common strings in emulated roku Replace IP and port with references from common strings * Update strings.json *Replace References in mix with sentence with their values. *Replace name_exists with already_configured * Replace references in config_flow
This commit is contained in:
parent
49b7f317ff
commit
622c56b6a7
@ -31,7 +31,7 @@ class EmulatedRokuFlowHandler(config_entries.ConfigFlow):
|
|||||||
name = user_input[CONF_NAME]
|
name = user_input[CONF_NAME]
|
||||||
|
|
||||||
if name in configured_servers(self.hass):
|
if name in configured_servers(self.hass):
|
||||||
return self.async_abort(reason="name_exists")
|
return self.async_abort(reason="already_configured")
|
||||||
|
|
||||||
return self.async_create_entry(title=name, data=user_input)
|
return self.async_create_entry(title=name, data=user_input)
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"title": "Emulated Roku",
|
"title": "Emulated Roku",
|
||||||
"config": {
|
"config": {
|
||||||
"abort": { "name_exists": "Name already exists" },
|
"abort": { "already_configured": "[%key:common::config_flow::abort::already_configured_device%]" },
|
||||||
"step": {
|
"step": {
|
||||||
"user": {
|
"user": {
|
||||||
"data": {
|
"data": {
|
||||||
"advertise_ip": "Advertise IP",
|
"advertise_ip": "Advertise IP Address",
|
||||||
"advertise_port": "Advertise port",
|
"advertise_port": "Advertise Port",
|
||||||
"host_ip": "Host IP",
|
"host_ip": "Host IP Address",
|
||||||
"listen_port": "Listen port",
|
"listen_port": "Listen Port",
|
||||||
"name": "[%key:common::config_flow::data::name%]",
|
"name": "[%key:common::config_flow::data::name%]",
|
||||||
"upnp_bind_multicast": "Bind multicast (True/False)"
|
"upnp_bind_multicast": "Bind multicast (True/False)"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user