Failure with dynamic icons?

Lowercase. Icon names must be all lowercase. Its in the docs.

Just tried with lowcase (again)… Doesnt make any differences.

Well, it’s messed up now. Restart and see what’s left.

Didnt help restarting openhab…

Something is messed up though, cause I now get a strange error in another sitemap (not the one involved with the icons). Will post this other issue in a new thread.

Dynamic icons work in general, but there are simple rules (like the non-obvious default icon requirement). There are many places a mess up can linger - browser cache, apache, blah. It will come out in the end if you’ve got everything right now :smiley:

Thats it, I believe I got everything right… It´s not a cache issue… Just tried from my phone as well as a tablet… I´ve ran out of ideas… This is really frustrating.

Try lowercase string for item state like „ssw“ and try again please

In the scale transformation??

If you made it there? Maybe take a new item as setpoint with 2 ore three values like n s w to test. If that works, it‘s a problem with your .js files

But I both have the same problem with the js and the scale file I´ve made as well…
Notice the two items. One is using the js, the other item is using a scale file insted.

I have change the transformation in the scale file to lowercase letters, and renamed all icons to lowercase.
Now I wait to get an update, cause openweather binding sometimes result in a UNDF for current wind direction… Dont know why. But usually it will update next time. (15 minutes). Lets see how it goes.
The other item (forecast3hours), using the windorse.js… I´m not sure how to change that file.

EDIT - Change one of the scales in the windrose.js to lowercase… Sitemap showing lowercase now. But icon still not right.

EDIT (again) - openweather just updated… Still icon not showing correctly. I guess I have to either give up or try clear the cache/tmp to see if it makes any changes.

Please Follow and try an item with String.

If the dynamic uses the value of the item, it will try to use the angle and not whatever you transformed!

Item changed to String format… Now waiting for openweather to update.

String localCurrentWindDirection      "Current wind direction [SCALE(windDirection.scale):%s]"                         <windrose>        { channel="openweathermap:weather-and-forecast:6f8991c0:local:current#wind-direction" }

(Btw… clear cache and tmp didn´t do any good).

Argh damit… The above wont work (ofcouse). The channel is a number… I´ll probably have to use a rule to translate it to a string insted.
Have to look at it tomorrow… times up for now.

Because of time I would have used separate item with setpoint for string to test it. And if that works you would know what to do :wink:

I did ask what your Item state was. Dynamic icons use the ‘raw’ state of the Item … before any transformation for display. Its in the docs. I’d missed your Number type Item definitions - no chance :crazy_face:

You may have your (string) state in uppercase, the icon selector will handle that, but you must use lowercase icon filename.

Yeah I realise that now… (wonder how come it worked when having made a couple of icons… But that just pulled med off).
I´m fiddling with a rule to tranform the number to string, and then use a second (proxy) item… But the rule I´d found throws an error… Dont know why, yet…

Post your Rule and error and you will get help

I wasnt a home… This is the rule:

The error says there is a missing ‘)’ at the end… But I dont think thats the actual error.

EDIT… I added an ) at the end. And now it seems to work just fine. Including the icons.

As we all said: if state is a string it will work.

Would be nice if you would share the icons here

Here you go…
windrose.rar.txt (39.2 KB)

1 Like

thank you so much for share.