[Updated] Weather Underground Driver - New API

@Cobra So I finally found solutions to incorrect WU data being shown for my location.

def params2 = [uri: "https://api.weather.com/v3/wx/forecast/daily/5day?geocode=${state.latt1},${state.long1}&units=${state.unit}&language=en-US&format=json&apiKey=${apiKey}"]

I modified your code and changed "language=en-GB" to "language=en-US" and now I'm getting the correct results (also matches my earlier posted JSON query). It's quite Bizzare that it makes a difference, but it's fully reproducible. While the "currentConditions" will be pretty much correct, the "forecastConditions" come back with different text that is frequently wrong for my location (in Australia) if you use "en-GB" as the language setting.

You might want to add this as an option to set this to the driver.

But the biggest cause of the incorrect "forecastConditions" was this line:

sendEvent(name: "forecastConditions", value: obs1.narrative[1], isStateChange: state.force )

0 = today's forecast and 1 = tomorrow's forecast

The difference is quite stark:

|0|"Mostly cloudy. Highs 19 to 21C and lows 8 to 10C."
|1|"Afternoon showers and thunderstorms. Highs 20 to 22C and lows 8 to 10C."

However, imo it should be using the second narrative section:

sendEvent(name: "forecastConditions", value: obs1.daypart[0].narrative[0], isStateChange: state.force )

then you get extra detail like:

Cloudy skies. High near 20C. Winds ESE at 15 to 25 km/h.

It's a shame that WU hasn't bothered to update their 5 Day Daily Forecast API Doco to cover all of the data you can access as you have to basically experiment to find out what is what.

While messing about with your Driver, I found you can also use the Hubitat location instead of pulling it from the station data, using:

location.getLatitude()
location.getLongitude()

I rather crudely modified your driver to put these into lattSaved, longSaved, state.latt1 and state.long1 for while I was trying to rule out location coordinates as an issue.

I also added cloudCover via these two lines:

attribute "cloudCover", "number"

sendEvent(name: "cloudCover", value: obs1.daypart[0].cloudCover[0], isStateChange: state.force )