How to add severe weather icon to widget?

Does anyone know how I can add a severe weather icon similar to one as in the second screenshot? Example yellow exclamation triangle for advisories, orange for watches and red for warnings?

$wi(code)$ and $wf(code)$ can detect severe weather like tornado and hurricane. You can use the output of this formula to display any image or icon you want using a simple “if” statement.

2 Likes

What about for other weather events such as advisories, watches or warnings?

Pretty sure that’s not possible to get advisory/watches like heat or tornado or hurricanes nor does warnings. Is the second picture actually of kwgt widget? But I’m pretty sure we can get warning throught wg function so that’s option if you really want that icon ha ha :joy: :wink:

The second one no, that is a 3rd party app

I think you can do it if you sign up for a free account at Openweather then you can use Tasker and the API to pull JSON info with the data you want. Then you’d have to broadcast it to Kustom and add whatever icons you want to appear with that data.

yep, definitely could be done, or maybe pull data from API Web Service (weather.gov)] it doesn’t require Api but not sure about how often it is up to date and pretty sure that’s limited to around North America so openweather might be best choice. weather.gov also has easy access endpoint that is going(after june 20th of this year) to be in-place Endpoint-alerts-changes-scn24-55_api_v1.13.pdf (weather.gov)

1 Like

I’m still a semi newbie, can you help me as far as steps to add the proper coding into the widget? I’d truly appreciate it.

thanks, I’m new too so no worries. so which app do you plan to use for formatting tasker or macrodroid? tasker is paid app while macrodroid is freemium. and I assume you are in USA since you are fine with weather-gov (I don’t need your location)

1 Like

I have Macrodroid and yes I’m in the USA. I don’t mind giving location - I’m in Knoxville TN

Ok I’ll try to make it. I asked for if you’re in usa because weather.gov is us government weather provider so I don’t know if it works overseas. And I’m just gonna provide background how it works. Fetch weather data from weather-gov api, extracts the county zone code which is needed for alerts api then fetches alert api and looks for the alert title which is the advisory title/name(ex. air quality alert, tornado watch)

Guess what I’m terrible at making macro but I built working macro (I really hope to make that macro better but at this time I don’t have much time since I’m studying) here you go make sure you take time to read the first few popups because they will not popup after first run. use following function to get the text title of advisory

Never mind forum don’t allow macro file share so I uploaded to google drive message me if you have trouble accessing the file it should be accessible since i turned on anyone with link access permission. Weather.gov_Advisory_API_to_Kustom(KWGT,KLWP,KLCK)_Offline✅️.macro - Google Drive

it feels nice not to deal with data(every computer science student’s dream because dealing with data is nightmare) hopefully it’s over ha ha. look over the macro, learn from it but it’s mess Sorry :pray:

I’ll probably make the proper kwgt and macro once I finish the summer classes till then take care. happy summer