Actually, I just tried a door icon from iconify using “currentColor” as below. And the same problem remains. The icon always uses the color specified in CLOSED when using iconcolor=["OPEN"="red", "CLOSED"="green"]
Tested, it works well in Basic UI (requires to enable “inline SVG” option) with the icon being either red or green, but does not work in the Android app (icon is always red).
So it looks like a bug in the Android app, not in OH core framework.
After reloading the Android app while the item state is CLOSED, the icon is now always green.
This is either a problem of icon cache (in the app) or a miss of refresh handling when new state is received.
Where can this option be found?
Edit: found it (Bindings → UI → Basic UI → settings icon)
That’s probably the case. iconcoloris not parsed from SSE events. While this can be fixed easily, I wonder whether iconcolor always was present in SSE events, or was there a time / some versions where this was not the case?
Edit: found out that
This gets me to an interesting problem: when receiving an SSE event without iconcolor, is it due to iconcolor not being defined for that particular state, or is it due to the server not supporting it? On the other hand, since it was defined only for images, not for sitemap widgets in general before, I guess there’s about nobody who used it before and the use case ‘initiial widget JSON contains iconcolor and later SSE event cancels it out’ isn’t really relevant? Thoughts?