Allow single entry in Downloader (#114957)

This commit is contained in:
Joost Lekkerkerker 2024-04-05 19:45:14 +02:00 committed by GitHub
parent e1575678ed
commit 5194215074
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 8 deletions

View file

@ -25,9 +25,6 @@ class DownloaderConfigFlow(ConfigFlow, domain=DOMAIN):
"""Handle the initial step."""
errors: dict[str, str] = {}
if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed")
if user_input is not None:
try:
await self._validate_input(user_input)
@ -48,9 +45,6 @@ class DownloaderConfigFlow(ConfigFlow, domain=DOMAIN):
async def async_step_import(self, user_input: dict[str, Any]) -> ConfigFlowResult:
"""Handle a flow initiated by configuration file."""
if self._async_current_entries():
return self.async_abort(reason="single_instance_allowed")
try:
await self._validate_input(user_input)
except DirectoryDoesNotExist:

View file

@ -4,5 +4,6 @@
"codeowners": ["@erwindouna"],
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/downloader",
"quality_scale": "internal"
"quality_scale": "internal",
"single_config_entry": true
}

View file

@ -1299,7 +1299,8 @@
"downloader": {
"name": "Downloader",
"integration_type": "hub",
"config_flow": true
"config_flow": true,
"single_config_entry": true
},
"dremel_3d_printer": {
"name": "Dremel 3D Printer",