1
mirror of https://github.com/home-assistant/core synced 2024-08-02 23:40:32 +02: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:
Gautham Varma K 2020-10-17 16:43:05 +05:30 committed by GitHub
parent 49b7f317ff
commit 622c56b6a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -31,7 +31,7 @@ class EmulatedRokuFlowHandler(config_entries.ConfigFlow):
name = user_input[CONF_NAME]
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)

View File

@ -1,14 +1,14 @@
{
"title": "Emulated Roku",
"config": {
"abort": { "name_exists": "Name already exists" },
"abort": { "already_configured": "[%key:common::config_flow::abort::already_configured_device%]" },
"step": {
"user": {
"data": {
"advertise_ip": "Advertise IP",
"advertise_port": "Advertise port",
"host_ip": "Host IP",
"listen_port": "Listen port",
"advertise_ip": "Advertise IP Address",
"advertise_port": "Advertise Port",
"host_ip": "Host IP Address",
"listen_port": "Listen Port",
"name": "[%key:common::config_flow::data::name%]",
"upnp_bind_multicast": "Bind multicast (True/False)"
},