What is the filename of a dynamic icon if state includes a /

Hi all,

I’m struggeling with dynamic icons. I have them working for several states. So icon-black.png and icon-white.png are showing up properly for states black and white. But to what will the filename resolve if the state is black/white? Will the slash be replaced/removed/escaped in some way since it cannot be part of the filename?

Thanks for your help

I’m pretty certain you simply can’t create an icon for that case. I think it should resort to the default icon though so you might be able to use the default icon.png to cover that one case, assuming you only have the one case with the “”.

1 Like

How are you getting the data into openHAB? Can you transform it or have your application send other data.

Good idea; if the text could be transformed to b_w or something, that should be a suitable state for use with a dynamic icon. A MAP in the label can in turn transform back to “black/white” for visual display.

1 Like

okay, thanks. I’m gonna try this…