Use single_instance_allowed for webhook config flows (#40965)

This commit is contained in:
springstan authored and GitHub committed 2020-10-01 20:44:13 +02:00
1 parent 17c6838b7f
commit c7ebfdb403
23 files changed
+27 -25

No files matched your search

@@ -36,7 +36,7 @@ class SpeedTestFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
async def async_step_user(self, user_input=None):
"""Handle a flow initialized by the user."""
if self._async_current_entries():
return self.async_abort(reason="one_instance_allowed")
return self.async_abort(reason="single_instance_allowed")
if user_input is None:
return self.async_show_form(step_id="user")
@@ -7,7 +7,7 @@
}
},
"abort": {
"one_instance_allowed": "Only a single instance is necessary.",
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
"wrong_server_id": "Server id is not valid"
}
},