1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Use single_instance_allowed for webhook config flows (#40965)

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

View File

@@ -136,7 +136,7 @@ class WebhookFlowHandler(config_entries.ConfigFlow):
) -> Dict[str, Any]:
"""Handle a user initiated set up flow to create a webhook."""
if not self._allow_multiple and 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")