Wonderground weather icon integration

The way OH icons work, if there is an icon file named with the following pattern:

name-state.png

Then when you supply and Item with <name> it will choose the icon that matches the Item’s current state. For example, expanding on @Udo_Hartmann’s example:

If you are using the Weather Binding the Condition ID returned is a Number. If you are pulling the icon from the the XML or JSON returned by the API directly (this is what I’ve switched to) there is an “icon” element.

So if you download the icons and name them something along the lines of “wunderground-1.png”, “wunderground-2.png” (yes, you will have to convert them to png format and wunderground forces you to download them individually) and you make sure to use the appropriate number code returned by the Weather Binding for the icon, then voila you will be using Wunderground Icons.

It is admittedly a lot of work but it is the only way to do it I know of. There is no way to build a binding to do this for you.

Awhile back I posted my full weather setup which uses Yahoo but I’ve since moved to just parsing the values out of the XML myself since the binding doesn’t support precipitation today which is one of the three main numbers I care about.