Dynamic Icons not wokring

I have also the problem that icons with a state icon dosn’t work at all.
I’ve created several, both PNG and SVG - changed config in Paper UI several times, OH restarts - nothing. Currently configured as PNG.
Even for new items it is constantly not working. All other static icons work.
I have OH 2.2.0 snapshot, but did also not work in OH 2.0 stable before.

Item:

Number OperationMode	"Szene"	<scene> 

Icon names are “scene-1.png”, “scene-2.png” etc. same with .svg (tried also without them in same directory)
Directory of all images conf/icons/classic (including the working ones)

Sitemap:

Switch item=OperationMode mappings=[1=Standard,2="At Home",3=Away] icon="scene"

Browser Inspection of the missing icon in Basic UI:

<img data-icon=​"scene" src=​"../​icon/​scene?​state=1&​format=png">​

2nd example

Weather Condition:
Item:

String	wuCondition	"Wetter [%s]"	<weatherug>  {channel="weatherunderground:weather:acac2d79:forecastToday#conditions"}

Sitemap:

Text item=wuCondition

Item has state string = “Bedeckt” (german sorry).
Image located in same folder named “weatherug-Bedeckt.png”

Browser Inspection:

<img data-icon=​"weatherug" src=​"../​icon/​weatherug?​state=Bedeckt&​format=png">​

Nothing is shown in Basic UI - just empty in both cases.
I tried even lowercase, with svg - nothing worked out.

Can anyone help how to solve this please … :slight_smile:

Without looking too long at your code I would say that capital letters in icons don’t/didn’t use to work so that might be causing issues.

1 Like

Okay, after going through all my dynamic icons I recognized that some didn’t have a basic icon, without state. So in my cases scene.png and weatherug.png - the 2nd one I had and it didn’t work.
So I assume that correcting all these cases (I had around 4-5 dynamic icons, 2 had a basic icon, the others not) worked out so that now all is working fine.