I have a similar āproblemā.
I have created different .svg-files and i want to embed them also according to a itemvalue.
i already achieved that by using:
img src but I lose the ability to format the svgās in my code by doing it this way.
Iād love to use xlink:href but somehow i canāt get it to work.
I appended .svg at the end and my link now looks like this:
that āpicking one icon, out of a set from only one svg fileā-part, is one of the parts in openhab that i donāt understand and i donāt find examples howto (make one svg file with many svg files in, address the icons, show them) maybe i donāt use the right spelling while i searchā¦
but if i where able to address this i would try:
where commandToPickIcon is the Syntax i donāt know and in this possible solution i would fill another item (mySVGFile) with the string of the SVG-File to select fromā¦
lol, the # is the commandToPickIcon (thanks a lot)
Sure i start read this, but i donāt want to install python (i am a typical win user) , thatās why i donāt complete reading till the end
then this should work: <use xlink:href="{{ '/static/Icons/' + itemValue('mySVGFile') + '.svg#' + itemValue( 'Condition')}}"></use>
or if you use only one SVG-File: <use xlink:href="{{ '/static/Icons/mySVGFile.svg#' + itemValue( 'Condition' )}}"></use>