Change all Sitemap Icons

Hey everyone,
I don’t really like the Pages and still favor the sitemaps especially as I use the openhab app. With the sitemaps I get more stuff on one screen than with the pages.

But to be honest the sitemap view isn’t really modern so I would like to give it a little twist by changing all icons. Would like to have them less colorful and alle with the same structure.

I know how to change the icons but I hope for one issue I’m facing there is an easier solution. Of course I still want the icons to be different based on the status (for example for lamps). Currently I’m doing this by adding this to my sitemap items

visibility=[Briefkasten_Voll==ON]

for example. But with this approach I have to have every item two times in my sitemap to be able to have the icon changed based on the status.

Is there anyway to change to - for example - change the light bulb icon but openhab automatically knows which file it should use based on the status?

I’ve already tried this Items | openHAB but maybe I understood it wrong. I created an icon bulb-on.png and bulb-off.png and placed it here \icons\classic. And in my items file i wrote bulb in the arrow brackets instead of light. But in the sitemap now no icon is visible doesn’t matter if on or off.

classic sitemap can use .png or .svg
generate svg from png or chnage settings should allow you to see the bulb.
I think it is icon=“bulb” in the sitemap rather than with the items file - at least that’s the approach I have done

Got it … I missed adding an icon without status.
I added

bulb.png
bulb-on.png
bulb-off.png

and “bulb” was added in items file and not sitemap file. Is working fine now.

Ok … looks like I need help in something very similiar to my first issue.
As I said, for switches I found my issue.
But now im stucked with rollershutters.

This time i created icons and named them rollladen.png, rollladen-0.png, rollladen-10.png, … rollladen-100.png. But I always got my basic / 0 items displayed neverless of the current highet of the rollershutters.
Items are rollershutter items and it works fine when using standard icons of openhab. Any idea whats wrong?

Hi, could you share the code?

I just tried to do what you described and it’s working for me.
For the test I created 5 icons, the first one i saved as two files- testvol.png and testvol-0.png:

in the .item file I added:

Dimmer TestDimmer "Test Dimmer Item" <testvol>

in the .sitemap file I added:

Slider item=TestDimmer label="Test Dimmer"

and it’s working as expected, changing the icon according to item’s value.
I checked something similar with a rollershutter item.

One thing that comes to mind from previous experience- if you happened to change the icon but kept same name, I think you need to refresh the app’s cache.
There’s a “Clear Image Cache” option in the app’s settings.
Or the more “uglier” way, change the names of the icon and check again.

1 Like

thanks man
that was a really dumb issue. clearing cache was the solution

1 Like