hi folks,
I have what I hope will be a simple request for help.
I would like to be able to use the downloader.download_file function within HA with a url which is different each time I call it…
The url variable is available through an attribute for an entity I have.
So I can retrieve the correct (and variable) attribute here:
You’re right I can’t reference a template in a url (just tried)…
I can extract the attribute as a state, could that help at all?
Not sure where to start. Or am I best to abandon this route?
I’m wanting to extract the generated arlo thumbnail to use it for deepstack processing.
Each thumbnail has a unique url…
Unfortunately it didn’t work, got the following error in the log:
Download Arlo4 Thumbnail: Error executing script. Invalid data for call_service at pos 1: invalid url for dictionary value @ data['url']```
I used the script editor via the front end..
You’re right, no luck through the UI.
thanks for the tip, I’ve seen those before and didn’t understand really what was being instructed. Makes sense now.
Did you restart HA or at least reload scripts (under Configuration / Server Controls)? The UI editor automatically does this (I think) but if you edit scripts offline, you need to get HA to reload them.
If you did, please let us know what output you get when you put your template in Developer Tools / Templates:
@troon! you’re awesome! That worked, all I needed was to restart HA. Another great tip!
I’m quite curious, the UI script editor produced something quite different from your recommended script. What the heck!?
At least I have yours to learn from now.
Once again this community has come to my rescue, wonderful.
I just tried the script mentioned above to use it as starting point for my file download and I get: Message malformed: extra keys not allowed @ data['download_arlo4_thumbnail']
Did anything change since 2020 with the file downloader? The parameters from above are still the same.