Icons are shown in wrong state

In the BasicUI the icons are changing to the correct state, but on Android I see the wrong icons.

I have 3 files light.svg, light-on.svg and light-off.svg! The light.svg icon is the -off icon!
But I see always the light-on.svg icon.

Another example is the motion icon.
Also 3 icons motion.svg, motion-on.svg and motion-off.svg!
And I see always the motion-on.svg icon.

If I remove my custom made icons for the light bulp I see the correct states again.

Did I miss something or is this still a known problem?
The problem is in local and remote connection.

I have only found this very old thread:

Are you sure that your item state is ON or OFF? Look in events.log

Yes I see it in the Visual Studio Code and it is working in the BasicUI.
I tap on my button “OFF” and the item gets the state “OFF” and I see the correct icon in the BasicUI in the Web Browser on my PC.

Now I check the Android app and I see the wrong icon.

Do you have the data saver mode enabled?

No is off. Never had that on.

The strange thing is that if I check the log inside the app I see that the app is requesting the correct state icon.
If I type exact the same http url as in the log on my browser I see the correct icon, but the app shows a wrong one.

Already did an openHab restart, App cache clear, App data clear but without success.

Can you post the “Device information” part of the log? It’s at the beginning of the log.

Device information
Model: Pixel 4
Manufacturer: Google
Brand: google
Device: flame
Product: flame
OS: 11
Display: 1080x2236, 2.75 density

Is there a line called “Data usage policy” after “Display”? Which version are you using?

Edit: The data usage policy isn’t shown in the latest stable verion.

No after Display there are the line with -
Afterwards I see “beginning of main”.

I see now this in the logs:

The strange thing is that the “openhab-local-address” is not replaced with the correct IP.
This was before my clear data not the case.

Should I send you the complete log?

I installed the BETA version and now I see the data usage policy.
Here again the entries:
Device information
Model: Pixel 4
Manufacturer: Google
Brand: google
Device: flame
Product: flame
OS: 11
Display: 1080x2236, 2.75 density
Data usage policy: DataUsagePolicy(canDoLargeTransfers=true, loadIconsWithState=true, autoPlayVideos=true, canDoRefreshes=true), data saver: 1, battery saver: false

The real address is only redacted in the log.

Which server version do you use?

You mean openHab version?
This is 2.5.10.

Small Update.
If I use .png icons the problem seems solved.

So there is something wrong if I use the .svg icons.

The app has the following order for icons. The first one found is used:

  1. Custom SVG
  2. Custom PNG
  3. Built-in SVG
  4. Built-in PNG

However this should be the same than in Basic UI.

Ok so do you need any additional Infos?
As mentioned with png it is working and with svg I have this strange behavior.

This sounds like a server side bug. Can you open an issue at https://github.com/openhab/openhab-core/?

Sure will do. Thanks.

As it works well in BasicUI I really don’t think about a core problem.
Maybe a cache problem in Android app?
You could also try to use a different icon name than the one from the official iconset. Try with mylight.

You are right. The BasicUI in the browser is working. So it should not be a core problem.
But I have already cleared the cache and the data of the android app.

Also I have tried a different icon name. No success.

As mentioned above I use now png files and all is working fine.