Listitem dynamic icon does not change

I try to use a dynamic oh:icon (custom) depenting on Item state.
But always the “base” Icon without - shown.

Any idea ?



Try to see whether you are using the correct one.

E.g. „lightbulb“ can not change on / off but „light“ does have states. Had the same issue today.


as I wrote, I try to use a custom Icon, which works fine in OH2.5.x, or are custom icons no longer supported ?

I tried to do the same but was not able to succeed with oh-icon.
I ended up with oh-label-card which provides an iconUseState property.
Otherwise you need to build that yourself like
icon: '=(item.state == "10") ? oh:icon-10 : (item.state == "20") ? oh:icon-20 : ...'

There is a checkbox that appears when you check “Advanced” that enables the changing of the icon based on the Item state.


yes I check this on, I have custom icons copied to “conf/icons/classic” (man.svg, man-anwesend.svg, man-abwesend.svg, man-anwesend_manuell.svg, man-abwesend_manuell.svg,).
The states of my “string” item are “Anwesend” , “Abwesend”, " Anwesend_manuell", Abwesend_manuell"

Any other idea ?

Thank you.