#How do I make home assistant update a webpage automatically every x minutes/hours?

1 messages · Page 1 of 1 (latest)

earnest egret
#

I have the NOAA NHC link to the hurricane map and it updates every so often. I also have HA displaying a page that shoes that as a card but I don't know how to make HA reload the webpage link every so often so it stays updated.

earnest egret
cinder kiln
#

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.

earnest egret
cinder kiln
#

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.

cinder kiln
cinder kiln
# earnest egret 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.