in sitemap, displays the wrong icon. Downloading the (correct) icon from GitHub provides the correct file which I put into /etc/openhab2/icons/classic But this didn’t display until I renamed it to poweroutletau without the “-” and changed the sitemap
OH2 has a problem with icons with “-” in the title where the part after the “-” doesn’t map to an item state.
To put it another way
icon="powersocketau" works with a copy of the icon renamed to "powersocketau" and placed in the /etc/openhab2/icons/classic folder
icon="powersocket-au" doesn't display the default icon "powersocket-au" and displays the default euro power socket instead
Just a minor bug, but thought I’d report it
Could you also post the GitHub URL please?
For dynamic icons to work you still need a
powersocket.png (or svg) file in addition to the
powersocket-au.png file. Have you got this? Then when the
powersocket item changes state to
au it ‘should’ work.
I also need to check, but all my dynamic icons are defined in my items file rather than the sitemap. Perhaps that has some influence?
Its not a dynamic icon thing, and that is likely the problem. The “au” on the end refers to Australia
powersocket-au is an Australian Power Outlet
powersocket-uk is a UK Power Outlet
powersocket-eu is a European Power Outlet
Unless of course it picks up the location somewhere along the way and the sitemap should contain just
They aren’t dynamic icons in this context as far as I’m aware, but they are named have dynamic icon naming. I have all my icons defined in sitemap, and the rest of them work so I suspect that isn’t the problem.
To workaround it I’ve put renamed icons into the /etc/openhab2/icons/classic folder
Fully agree. Here we go:
Btw. openHAB doesn’t have “a problem with icons with “-” in the title”, the dash simply has a special meaning and shouldn’t be part of the icon name (which it was for the mentioned icons).