Use common strings in Ecobee config flow (#41257)
* Update common Strings * one_instance_only -> single_instance_allowed
This commit is contained in:
parent
5f695e789b
commit
0a3db42d61
3 changed files with 4 additions and 4 deletions
|
@ -29,7 +29,7 @@ class EcobeeFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
"""Handle a flow initiated by the user."""
|
||||
if self._async_current_entries():
|
||||
# Config entry already exists, only one allowed.
|
||||
return self.async_abort(reason="one_instance_only")
|
||||
return self.async_abort(reason="single_instance_allowed")
|
||||
|
||||
errors = {}
|
||||
stored_api_key = (
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"token_request_failed": "Error requesting tokens from ecobee; please try again."
|
||||
},
|
||||
"abort": {
|
||||
"one_instance_only": "This integration currently supports only one ecobee instance."
|
||||
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ async def test_abort_if_already_setup(hass):
|
|||
result = await flow.async_step_user()
|
||||
|
||||
assert result["type"] == data_entry_flow.RESULT_TYPE_ABORT
|
||||
assert result["reason"] == "one_instance_only"
|
||||
assert result["reason"] == "single_instance_allowed"
|
||||
|
||||
|
||||
async def test_user_step_without_user_input(hass):
|
||||
|
|
Loading…
Add table
Reference in a new issue