Limitation of MAP file and dynamic icons

I’m running openHAB 2.2 on a Windows 10 machine but I think that the limitation I encountered applies to all platforms using the basic UI.

It seems it is impossible to use dynamic icons If an item, such as Astro DayPhase, has a MAP file to convert a state such as DAYLIGHT to a more readable Day Light status in the basic UI. I found that the dynamic icons are mapped to the transformed state and not to the original state and that spaces in a dynamic icon name are not parsed.

So assuming we have the following icons:
sun-day light.png

The basic UI will successfully display the first 3 icons but will fail to display the last one due to the presence of a space in the file name.

Can anyone else confirm that it’s a know limitation and if this is the case is there any way to apply the MAP file on the original state of the item?


follow the link in the docs for maps:

and you’ll get this:

The key contains all of the characters in the line starting with the first non-white space character and up to, but not including, the first unescaped ‘=’, ‘:’, or white space character other than a line terminator. All of these key termination characters may be included in the key by escaping them with a preceding backslash character; for example,

tl:>dr: Just escape the Special characters with \, in your case sun-day\ light.png