National Weather Service API call


Trying to get weather icon data from the NWS.
Getting this…


$[0].icon gives

How do I get the actual icon into a variable ?

Putting in my browser gives…



I’m confused, what’s the end goal? It looks like you got the correct path already.


I’m trying to put the icon into a Hubitat dashboard tile. I need the icon in the variable, not the url. Does that make sense? Or am I way off base here?


Ah, yeah that makes sense but I don’t think we can do that. Is it the stock hubitat dashboard or are you using some sort of ‘super’ tile?


I have asked the author if the “web tile” option can use a variable. Currently it requires a URL. But my weather image URL changes often and so I am trying to update my Hubitat variable with webcore. That is where I was going to put the icon image if I could get it into a variable. He also has an “image tile”, but it requires a URL and I cannot use a variable there either. I am probably making this WAY harder than it is…


Do I remember you having a pi running in your network? Maybe you can download that image on a cron and just point the URL at your local pi.


Good memory! Excellent suggestion. I’ll give it a try. Thanks.


I’m not an expert on this, so din’t know how do do it exactly, but I suspect you could write a node.js app on the PI to scrape the image and return it as a variable.

I’ve done this with text, but sure with an image.


I kinda do the same thing with bloomsky images that I put on my dashboard. It’s a little convoluted but it works lol. I have webCoRE pull the current image url from bloomsky, pass it on to node-red that executes a python script that downloads the image and renames it to something that I reference on the dashboard.