#How do I make home assistant update a webpage automatically every x minutes/hours?
1 messages · Page 1 of 1 (latest)
Looks like the fix is to use this https://github.com/dimagoltsman/refreshable-picture-card
a refreshable picture card for HACS. Contribute to dimagoltsman/refreshable-picture-card development by creating an account on GitHub.
Are you displaying a webpage in an iframe or just an image?
If you're just using a picture, the custom:button-card can use it as a background and triggers_update: all (or a specific automation/entity change can update it).
You could also use browser_mod, which has a browser refresh service call that can be triggered to force the whole dashboard to refresh on a specific device which could be used in an automation. I have one set up so anytime a lovelace_updated event fires, the automation has the tablets refresh themselves.
an image. The refreshable picture card seems to work for static links but now I have an issue with links that have a date/time in them. I don't know how I'd get those to update
Send me a link to one of the images you're using from NOAA NHC. I get satellite images from NOAA NWS. While there are options to download images with date/timestamps, they release an image with a static filename that is also the most up-to-date. For example, https://cdn.star.nesdis.noaa.gov/GOES19/ABI/SECTOR/cgl/Sandwich/GOES19-CGL-Sandwich-600x600.gif.
I have an automation set up that downloads this image. It also changes the filename to simply `CGL-Sandwich.gif'. Then, the card on the dashboard just references the local file.
I'm not sure if NHC is set up the same way as NWS but it might be worth a try. If not, perhaps I can try to figure something else out.
Was looking at some of the source code for NOAA NHS. Came across this: https://www.nhc.noaa.gov/xgtwo/two_atl_2d0.png
Browsing to https://www.nhc.noaa.gov/xgtwo/ brings up some useful looking files. (Although some of them are old given the number of disturbances at the time but the files haven't "expired" or been removed.)
woops guess I forgot to check this
Looks like you're wanting to do the same as I do. I let an automation handle getting the images. You don't really need the timestamped images. At the bottom of the folder you posted above, you'll find all the static files that NOAA update regularly. Those are the ones to use. I use the automation to get the images because I have then shown on a couple static dashboards on tablets; less file requests to NOAA's server. I display the images in a custom:button-card with the triggers_update: set to the automation. When the automation fires, the card updates with the new image.
alias: Download satelite animations
description: Downloads the lastest satelite animations from NOAA.org
mode: single
triggers:
- enabled: true
minutes: /15
trigger: time_pattern
conditions: []
actions:
- data:
overwrite: true
url: https://s.w-x.co/staticmaps/wu/wu/wxtype1200_cur/usday/animate.png
filename: WU-animated.png
action: downloader.download_file
- data:
overwrite: true
url: >-
https://cdn.star.nesdis.noaa.gov/GOES16/ABI/SECTOR/cgl/GEOCOLOR/GOES16-CGL-GEOCOLOR-600x600.gif
filename: CGL-Geocolor.gif
action: downloader.download_file
- data:
overwrite: true
url: >-
https://cdn.star.nesdis.noaa.gov/GOES16/ABI/SECTOR/cgl/Sandwich/GOES16-CGL-Sandwich-600x600.gif
filename: CGL-Sandwich.gif
action: downloader.download_file
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
The delay at the end just ensures the files are downloaded before the card tries to update.