Custom dynamic icons

Hi,

i searched the fourm and did not find a solution. I have 2 custom icons in svg format. I rename it to
blindup.svg
blindup-on.svg
blindup-off.svg

I have a virtual item called shutterKitchenDown. If the item, a switch changed to ON the new icon with blindup-on does not show the ON-icon. I can see ee the logs, that the rule and the item is triggered and change its state to ON. What is the exact naming?

I copied these icons into \openhab\openHAB2-conf\icons\classic

I do not know what i am doing wrong.

Thank you for your help in advance.

Look correct.
Can you post the item definition, please?

Also, is your UI set to use SVG icons?

Switch shutterKitchenUp "shutterKitchenUp" <blindup>

Switch shutterKitchenDown "shutterKitchenDown" <blinddown>

Switch shutterKitchenPause "shutterKitchenPause" <blindup>

Paper Ui / Configuration / Services / UI / Basic UI / IconFormat = Vector

It is all set.

Here are the icons:

blindup blindup blindup-on

My rules are followin. The names “ON” and “OFF” is switching the color, but not the icons

rule "rule_shutterKitchenUp"
when
Item shutterKitchenUp received command
then
if(receivedCommand == ON ){        
    //rfxcom_rfy_usb0_Kueche_shutter.sendCommand(UP)
    Thread::sleep(5000)
    shutterKitchenUp.postUpdate(OFF)
}   
end

rule "rule_shutterKitchenDown"
when
Item shutterKitchenDown received command
then
if(receivedCommand == ON ){        
   // rfxcom_rfy_usb0_Kueche_shutter.sendCommand(DOWN)
    Thread::sleep(5000)
   shutterKitchenDown.postUpdate(OFF)
}   
end

I found the fault. I had icons with the same name weeks ago. I deleted them and add the new ones. I did not chnage the name, so that i do not haveto change every widget in the dashboard. But somehow the framework keep these old icons. Even a restart of the whole machine does not work. Only the renaming of the new files is the solution.

I am controlling blinds in a tri-state from an RM PRO so I have a up / stop / down for the blind. I would like to have dynamic icons showing blinds-0 for up, blinds-100 for down and blinds-50 for a stop command - I get I can make custom icons with the ON or OFF but how to manage the stop?

You cannot represent a stop command with an OH icon, only states.

If your Item has states 0-100, you could have icons with names myicon-0, myicon-1, myicon-100 for the effect you want. the -1 icon will show for any numbers 1-99. Don’t forget you must also provide a default myicon version.

of course! it doesnt really matter what these settings of the mapped states are as its is just comparing a value for a rule. ive set to 0, 50 and 100 and got it exactly how i want