I have noticed that the state of dynamic icons do not work if they are local ($CONFIGDIR/icons/classic). Built-in dynamic icons do work however.
Is there any way to get the local dynamic icons to work?
Thanks.
/etc/openhab2/icons/classic$ ls
gas.svg gas-on.svg gas-off.svg
Needs to be .svg, one item for normal state i.e. gas.svg one for on i.e. gas-on.svg, one for off gas-off.svg
then it should work
They are .svg format.
Here is my directory.
root@alarmpi:/etc/openhab2/icons/classic# ls
fire-closed.svg lock-1.svg lowbattery.svg siren.svg temperature.svg
fire-open.svg lock.svg readme.txt temperature-0.svg time-on.svg
fire.svg lowbattery-0.svg siren-closed.svg temperature-40.svg time.svg
lock-0.svg lowbattery-1.svg siren-open.svg temperature-90.svg
Note that I have changed the suffix for some of the icons to correspond with the item types that I used (e.g. closed/open for the fire icon). It might have something to do with that.
They work perfectly in basicui but in the android app I just see the basic icon, and in some cases (e.g. lowbattery) the icon doesn’t even appear.
By example, here are two screenshots of the same sitemap with same state between the basicui and the android app.
I found the solution. I changed the icon format in the Settings from PNG to SVG and then it worked!
One thing I noticed though, is the charts don’t work once the format is switch to SVG.
Well… I thought you allready did that…