mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Use reference strings in Alarmdecoder (#41392)
This commit is contained in:
parent
d2d3749223
commit
b7c2e117be
@ -111,7 +111,7 @@ class AlarmDecoderFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
title=title, data={CONF_PROTOCOL: self.protocol, **connection}
|
||||
)
|
||||
except NoDeviceError:
|
||||
errors["base"] = "service_unavailable"
|
||||
errors["base"] = "cannot_connect"
|
||||
except Exception: # pylint: disable=broad-except
|
||||
_LOGGER.exception("Unexpected exception during AlarmDecoder setup")
|
||||
errors["base"] = "unknown"
|
||||
|
@ -18,7 +18,7 @@
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"service_unavailable": "[%key:common::config_flow::error::cannot_connect%]"
|
||||
"cannot_connect": "[%key:common::config_flow::error::cannot_connect%]"
|
||||
},
|
||||
"create_entry": { "default": "Successfully connected to AlarmDecoder." },
|
||||
"abort": {
|
||||
|
@ -126,7 +126,7 @@ async def test_setup_connection_error(hass: HomeAssistant):
|
||||
result["flow_id"], connection_settings
|
||||
)
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_FORM
|
||||
assert result["errors"] == {"base": "service_unavailable"}
|
||||
assert result["errors"] == {"base": "cannot_connect"}
|
||||
|
||||
|
||||
async def test_options_arm_flow(hass: HomeAssistant):
|
||||
|
Loading…
x
Reference in New Issue
Block a user