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!
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.
Old topic but I found it just today for my scopes 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 /icon/myicon.png
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.