Use common Strings for Z-Wave config flow (#41161)

* Use common Strings for Z-Wave config flow

* Update strings.json

* Update config_flow.py
This commit is contained in:
Spartan-II-117 2020-10-05 05:26:06 -07:00 committed by GitHub
parent 15ade1232e
commit c02d9050b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -31,7 +31,7 @@ class ZwaveFlowHandler(config_entries.ConfigFlow):
async def async_step_user(self, user_input=None): async def async_step_user(self, user_input=None):
"""Handle a flow start.""" """Handle a flow start."""
if self._async_current_entries(): if self._async_current_entries():
return self.async_abort(reason="one_instance_only") return self.async_abort(reason="single_instance_allowed")
errors = {} errors = {}

View File

@ -14,8 +14,8 @@
"option_error": "Z-Wave validation failed. Is the path to the USB stick correct?" "option_error": "Z-Wave validation failed. Is the path to the USB stick correct?"
}, },
"abort": { "abort": {
"already_configured": "Z-Wave is already configured", "already_configured": "[%key:common::config_flow::abort::already_configured_device%]",
"one_instance_only": "Component only supports one Z-Wave instance" "single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]"
} }
}, },
"state": { "state": {
@ -30,4 +30,4 @@
"ready": "Ready" "ready": "Ready"
} }
} }
} }