Icon pickers now support manual entries

I’ve made a minor but (potentially) needed change in the HABPanel icon handling, in order to enable more flexibility for icon selection until additional iconsets can be somehow added to the list.

All icon pickers thoughout the application, including those in standard and custom widgets, now feature two additional options: Custom icon and Custom URL:

Selecting those “special iconsets” will display text inputs instead of the standard icon picker dropdown:

  • Custom icon allows to select an icon registered in openHAB (including icons added in conf/icons/classic). Those are “state-aware”: for example, stars will display
    stars-on.svg resp. stars-off.svg when the item’s state is ‘ON’ resp. ‘OFF’ if they exist.
    (Check out @ThomDietrich’s repository for the icons used in this example)
    Only the SVG format is supported for custom icons.
    Also, custom icons can’t be “colorized” like the built-in icons.

  • Custom URL allows an arbitrary image to act as an icon. All formats supported by the browser are allowed, including SVG, PNG, JPEG, GIF etc.

Note: this shouldn’t break the existing API so your current icons will still work!


How do I get the icon picker to show up?

You need to update your openHAB to latest snapshot version, it should show up.

1 Like

How can I do dynamic icons with this?

ive added my icons to icons/classic and type the file name in but i just get a broken image can anyone help? ive checked and my files follow the rules.

Chances are, it’s case sensitive, check your casing and if doesn’t work check the Network tab (or the Console) in the browser’s developer tools and look for a 404 error.

ive checked the case sensitivity and they are in lower case. ill have a look for 404 errors

thank you

i get a server 500 error any ideas ?

Please check that you have set read permissions for everyone for your own icons.

Old topic but I found it just today for my scopes :grinning: and I’d like to add a post in case someone like me was finding difficulties using .png icons (e.g. myicon.png) placed in the classic icon folder: the Custom URL that works for me is
I see /static/… as shown in first post is for the html folder.
My OH 2.5 is a manual installation, but url should not make difference. :wink: