i am using OpenHab2.5.3 with KNX and i need to change some icon colors to match the situation.
Like if i block my shutter-movement, the icon goes green because the item is “ON” or similar. But in fact this should cause a red icon. If the movement is not blocked, the item is “OFF” but the icon should be green instead of red.
Assuming you’re talking about BasicUI, the dynamic icons are connected to the item states. So, instead of calling the dynamic icon (e.g. switch.png), you might be able to call the specific state (e.g. switch-off.png) that you want to show. Then, you can use visibility to identify when your sitemap shows one or the other.
The easiest way would be to create your own set of custom dynamic icons to use with this Item.
You can copy and rename the files of standard icon set for this purpose.
Thanks. It is indeed about BasicUI and the standard icons. I am wondering if and how custom icons would work with Android and iOS App
So there is no chance to “invert” the link between icon and item-state?
Why wouldn’t they? If I recall you used to have to take care with png/svg use for iOS.
Nope. icons are selected by someIcon-thisItemState.png (or svg)
You can change the state of your Item.
You can change the someIcon root selection.
You cannot have someIcon-someOtherState
I was wondering if OpenHab is sending icons on demand to iOS / Android app or just using standard icons which come with the installation of these apps.
If it just takes what comes with installation, i wouldnt see my custom icons in the android/ios app. But if that works, i will give it a try
Yes, icon images are served from the openHAB host via an iconpicker mechanism that does the selecting by state.
The apps include no icons.
It’s not that difficult to set up a set of custom dynamic icons, just fiddly.