Custom icon does not respond to item value

  • Platform information:
    • Hardware: Raspberry Pi
    • OS: openhabian
    • openHAB version: 3.2.0.M2

Hi. Thanks for all the great work you are doing!

I’ve made a custom icon that should respond to item changes. However, only the default icon is seen, independent on the item string value.

I’ve found documentation, and for the life of me cannot see that I’m doing anything wrong.

Place and naming of icons can be seen here:

This is how it looks in my floorplan (the icon with questionmark is the “verisureshield.png” file)

Here is the yaml of the widget:

component: oh-plan-marker
  coords: 87.99279481526803,72.61015890910853
  icon: oh:verisureshield
  iconUseState: true
  item: Alarm_AlarmStatus
  name: Alarm Status
  tooltipPermanent: true
  default: []

The only guess I have is that the item value sometimes appear as with space, sometimes with underscore, but I’ve tried both without success.

Any help would be highly appreciated!!

I don’t know if MainUI uses the same icon picker as BasicUI, or follows the same rules, but your filenames are not in accordance with the longstanding OH convention.
They should be all lowercase e.g.
myicon-some_string.png not myIcon-SOME_STRING.png

The built in icon for switch state ON for example is switch-on.png

That’s it!! Thanks @rossko57 !

I thought I tried it, but maybe I didn’t wait long enough. When I look at the documentation indeed all the examples use lower case, and it refers to the standard icon naming conventions.

Thanks again!