@milty456 did you ever solve this? I have the exact same problem.
No. I could never get these working properlyā¦not sure who marked it as solved. I dumped the icons in every directory at every level. It never worked.
Hello!
Do you have icons in the right folder? You said you had your icons in conf/icons/basic, but icons should go to conf/icons/classic. The folder classic should not to be confused with Classic UI. It is folder for Classic icon set, not Classic UI, so, if you are using Basic UI, you should not put icons in conf/icons/basic, but conf/icons/classic too. And few remarks:
- Donāt use uppercase letters for icon names
- Donāt use blank/space in icon names
- Donāt use hyphen in the name - only use it if you have dynamic icons (i.e. soundlevel-10, soundlevel-20) - you can use underscore instead
Hope this helps.
Best regards,
Davor
I am running latest snapshot openHAB 2.0 and classic UI and have it configured for .png icons. All icons that are NOT part of openHAB 2.0 work fine, but ones that have the same name as 2.0 donāt work such as door-open and door-close. I would think that conf/icons/classic/door-close.png should have preference over any other 2.0 door-close icon.
This is by the way all covered in the documentation article on items for a long time: http://docs.openhab.org/configuration/items.html#icons
Could be presented clearer though.
@sipvoip I wouldnāt call them the same way but yes, I agree they should have precedence. Could you create an issue ticket?
The filename has to be all lowercase. That was the problem I had. I was using myBattery.png aus filename. It has to be mybattery.png to work. Thank you for the solution.
Hi there, IĀ“ve a similar problem, which I described here:
DonĀ“t want to post it twice
I canāt figure out how to make dynamic icons work correctly when the text value for the item has a space in it.
Specifically, Iām using dynamic icons for the āConditionā field returned by the weather binding.
Iāve specified the icon as condition and in icons/classic I have a ācondition.svgā and a bunch of others for specific values. ācondition-clear.svgā or ācondition-overcast.svgā will work and get correctly used for āClearā or āOvercastā condition values, but ācondition-partly_cloudy.svgā will not get used for āPartly Cloudyā. In that case, I just get the default ācondition.svgā icon.
From what Iād read, I thought a space in the string would get mapped to an underscore in the file name but that doesnāt work.
What is the correct file name to use?
Thanks,
Scott
I was able to get mine working (at least for browser clients).
You need to use an actual space in the icon name for text values with spaces. For example, ācondition-mostly cloudy.svgā will work correctly.
Thanks Lopez1de. That just solved a major headache I had
But it should, just as documented in Items | openHAB.
Better try to figure out what is wrong about that (as it works for others) instead of doing ugly workarounds that will prevent you from ever doing a proper update againā¦
Hello!
Youāve said that you tried adding icons to /conf/icons, but, if Iām not mistaken (and thatās the way Iām using custom icons), icons should go to /conf/icons/classic folder. And double check if icon name has uppercase letters or special characters. If it has hyphen in the filename and itās not a dynamic icon, it will not work.
Best regards,
Davor
Yes. And from that folder they do work as intended.
Anybody know, how can I now use cusotom icon in custom widget in HABpanel?
For other icons i am using
iconset="āfreepik-householdā" icon="ālightā"
What iconset i should use for custom icon?
I dont know how you create a custom icon set. But if you want to use custom made icons, youĀ“ll just do it the same way as if it was basicUI. But as far as I remember, it has to be SVG format only.
I have found.
iconset="ācustom-iconā"
is working
Had problems with this too: This is what I did and the mistake I found after hours of frustration:
- Copied a battery-10.svg and battery-90.svg into the icons/classic folders and renamed batteri-0.svg and batteri-1.svg as my batteri items states are only 0 or 1.
- Spent way too many hours frustrated why my icons refused to show up.
- Realized that a default batteri.svg was missing, copied one of the files and renamed it to batteri.svg.
- Icon showed up!
A quick look into the docs would have saved you that:
A third default icon file, switch, is required as well.
Yeah I recall reading that page early on, but didnāt understand it apparently!