[SOLVED] Custom icons for weather condition

Running OH2.2 (release).

I am trying to get dynamic icons for weather conditions depending on the state of the item that represents the condition.
Looking at the logfiles, this item changes the state e.g:

Weather_Current_Condition changed from UNDEF to Bedeckt

My item defnition:

String	Weather_Current_Condition	"Wetter [%s]"				<weather>		(gWeather)	{channel="weatherunderground:weather:60c0c1dc:current#conditions"}

I have two icons within the icons/classic folder (SVG):
weather-Bedeckt.svg
weather.svg

But i only get the weather.svg displayed. The other one not.
I tried to change it also to weather-bedeckt.svg (assuming there are problems with upper/lowercase) but even that did not work.
BasicUI icons are configured to Vector.

Does anybody have an idea why this is not working?

My reading of the docs is that the value after the hyphen needs to be a known state and not a string.

Thanks for answering.
I’ve logged the state of the item:

Weather_Current_Condition (Type=StringItem, State=UNDEF, Label=Wetter, Category=weather, Groups=[gWeather])

So the state is currently UNDEF (Due to problems with the weather binding).
But I do have a weather-UNDEF.svg but it is not displayed.

So i’m a bit stuck - if anybody has any ideas, please get back to me :slight_smile:

I have the same setup but with png-files working. To be honest I don’t see anything wrong here…You can maybe switch temporary to png files and UI-Setting just to be sure that there is no bug.

1 Like

for one thing, it needs to be all lowercase, you did try that, but it might well be that tha cache wasnt updated. I suggest you make it lowercase and restart openhab

1 Like

Yes I just read that (RTFM…sorry :wink: ). Changing icons to PNG and all lowercase definitely works.
I think I will go with that since it’s pretty hard to find a nice free SVG icon set for weather.

Thanks for helping

1 Like

Let me know if you find SVG icons for weather! Seems like there should be a included dynamic icon for this!

Currently i’m using them:


At the moment only the static icons, but the download does have both, static and dynamic icons

1 Like

Is there a way to use these by replacing the .png icons or some other configuration is also required somewhere that should not point the image to .png and instead should point to .svg?

Within PaperUI, go to
Configuration --> Services -->UI --> BasicUI.
You can change the icon format there:
image

Thanks, this was helpful.