mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Use references in guardian strings.json (#40987)
This commit is contained in:
parent
81c6d48cb4
commit
aba3cdc7b3
@ -83,7 +83,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
async def async_step_zeroconf(self, discovery_info):
|
||||
"""Handle the configuration via zeroconf."""
|
||||
if discovery_info is None:
|
||||
return self.async_abort(reason="connection_error")
|
||||
return self.async_abort(reason="cannot_connect")
|
||||
|
||||
pin = async_get_pin_from_discovery_hostname(discovery_info["hostname"])
|
||||
await self._async_set_unique_id(pin)
|
||||
|
@ -6,7 +6,7 @@
|
||||
"description": "Configure a local Elexa Guardian device.",
|
||||
"data": {
|
||||
"ip_address": "[%key:common::config_flow::data::ip%]",
|
||||
"port": "Port"
|
||||
"port": "[%key:common::config_flow::data::port%]"
|
||||
}
|
||||
},
|
||||
"zeroconf_confirm": {
|
||||
@ -14,9 +14,9 @@
|
||||
}
|
||||
},
|
||||
"abort": {
|
||||
"already_configured": "This Guardian device has already been configured.",
|
||||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
|
||||
"already_in_progress": "Guardian device configuration is already in process.",
|
||||
"connection_error": "Failed to connect to the Guardian device."
|
||||
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,4 +138,4 @@ async def test_step_zeroconf_no_discovery_info(hass):
|
||||
DOMAIN, context={"source": SOURCE_ZEROCONF}
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "connection_error"
|
||||
assert result["reason"] == "cannot_connect"
|
||||
|
Loading…
x
Reference in New Issue
Block a user