Closed DarthSonic closed 5 months ago
Hey there @erwindouna, mind taking a look at this issue as it has been labeled with an integration (downloader
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
downloader documentation downloader source (message by IssueLinks)
+1 Pls. I'm in the same boat.
Me too!!!
+1 please. Same issue after updating to 2024.4. The downloader.download_file service doesn't seem to exist.
The same for me.
If you restart HA is does load and imports the yaml configuration entry as well as warn about the deprecation of the yaml version and to remove the enries from configuration.yaml
If you restart HA is does load and imports the yaml configuration entry as well as warn about the deprecation of the yaml version and to remove the enries from configuration.yaml
This worked for me. Thank you
If you remove the configuration.yaml entries, where do you specify the network share to output the files?
Can it be that it’s just the setup procedure that changed? In release notes is stated: ‚now available to set up from the UI’
I can’t verify on my own right now…
If you remove the configuration.yaml entries, where do you specify the network share to output the files?
It should go in the subdir parameter. Here's an example of what I have now:
- service: downloader.download_file
data:
url: 'https://myimage.com/image.jpg'
subdir: /config/camera
filename: camera.jpg
I haven't tried it with a network share but it works when the file is stored on locally.
I figured it out. I removed the configuration.yaml downlaoder: entry. I then deleted the integration. I rebooted HA. I then added the integration from the UI. It asked for the output location. I specified my share location. Everything seems to be working now.
If you remove the "old" configuration form configuration.yaml, remove integration of "Downloader", then restart, you can add the integration "Downloader" and specify the download directory. Then you can run your automation script and everything should work.
As I mentioned here, it would be a great improvement if we could see what dir was set in that new downloader UI.
As it stands now on 2024.4 after we set the dir there is no way AFAIK to check/read the dir set in place.
I'd like to ask the developer(s) (@erwindouna ?) to please include it in the UI so that it gets visibility.
Cheers, -jprates
I am currently still investigating what could cause this - it's not very straight forward at the moment.
Thanks all - looks like a bug relating to the migration from YAML to UI configuration. As others have said, removing the YAML config and rebooting allows it to load. No need to remove the integration - it loaded just fine after the reboot.
Please post the full log there is likely an exception that happened before asyncio.exceptions.InvalidStateError: invalid state
that gets the setup into an invalid state that will need to be discovered to find the source of the issue
We do usually do import flows in a task https://github.com/home-assistant/core/blob/e845d127339e3e01ce2485d09719c8149f312c4a/homeassistant/components/downloader/__init__.py#L46
It looks like the import flow does not abort on invalid dir https://github.com/home-assistant/core/blob/e845d127339e3e01ce2485d09719c8149f312c4a/homeassistant/components/downloader/config_flow.py#L35 and instead will present a form
Thanks all - looks like a bug relating to the migration from YAML to UI configuration. As others have said, removing the YAML config and rebooting allows it to load. No need to remove the integration - it loaded just fine after the reboot.
I tried without removing the integration, but that didn't work for me, so it might depend on a setting if this is needed or not.
but it's working now and that's the most important.
Thanks, everyone! Removing the YAML config and rebooting has it working again!
Fixed provided in 2024.4.1.
The problem
Downloader does not start/initialize.
What version of Home Assistant Core has the issue?
core-2024.4.0
What was the last working version of Home Assistant Core?
core-2023.3.6
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Downloader
Link to integration documentation on our website
https://www.home-assistant.io/integrations/downloader/
Diagnostics information
Logger: homeassistant.bootstrap Quelle: setup.py:181 Erstmals aufgetreten: 10:29:47 (1 Vorkommnisse) Zuletzt protokolliert: 10:29:47
Error setting up integration downloader - received exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 166, in async_setup_component setup_future.set_result(result) asyncio.exceptions.InvalidStateError: invalid state
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 181, in async_setup_component future.set_exception(err) asyncio.exceptions.InvalidStateError: invalid state
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response