mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Allow single entry in Downloader (#114957)
This commit is contained in:
parent
e1575678ed
commit
5194215074
@ -25,9 +25,6 @@ class DownloaderConfigFlow(ConfigFlow, domain=DOMAIN):
|
|||||||
"""Handle the initial step."""
|
"""Handle the initial step."""
|
||||||
errors: dict[str, str] = {}
|
errors: dict[str, str] = {}
|
||||||
|
|
||||||
if self._async_current_entries():
|
|
||||||
return self.async_abort(reason="single_instance_allowed")
|
|
||||||
|
|
||||||
if user_input is not None:
|
if user_input is not None:
|
||||||
try:
|
try:
|
||||||
await self._validate_input(user_input)
|
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:
|
async def async_step_import(self, user_input: dict[str, Any]) -> ConfigFlowResult:
|
||||||
"""Handle a flow initiated by configuration file."""
|
"""Handle a flow initiated by configuration file."""
|
||||||
if self._async_current_entries():
|
|
||||||
return self.async_abort(reason="single_instance_allowed")
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await self._validate_input(user_input)
|
await self._validate_input(user_input)
|
||||||
except DirectoryDoesNotExist:
|
except DirectoryDoesNotExist:
|
||||||
|
@ -4,5 +4,6 @@
|
|||||||
"codeowners": ["@erwindouna"],
|
"codeowners": ["@erwindouna"],
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/downloader",
|
"documentation": "https://www.home-assistant.io/integrations/downloader",
|
||||||
"quality_scale": "internal"
|
"quality_scale": "internal",
|
||||||
|
"single_config_entry": true
|
||||||
}
|
}
|
||||||
|
@ -1299,7 +1299,8 @@
|
|||||||
"downloader": {
|
"downloader": {
|
||||||
"name": "Downloader",
|
"name": "Downloader",
|
||||||
"integration_type": "hub",
|
"integration_type": "hub",
|
||||||
"config_flow": true
|
"config_flow": true,
|
||||||
|
"single_config_entry": true
|
||||||
},
|
},
|
||||||
"dremel_3d_printer": {
|
"dremel_3d_printer": {
|
||||||
"name": "Dremel 3D Printer",
|
"name": "Dremel 3D Printer",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user