Basic UI: Icons affected by visibility change (displayed icons do not match item state)

  • Platform information:
    • Hardware: Intel NUC6CAYH/NUC6CAYB
    • OS: Ubuntu 18.04.2 LTS
    • Java Runtime Environment: OpenJDK Runtime Environment (Zulu 8.36.0.1-CA-linux64) (build 1.8.0_202-b05)
    • openHAB version: openHAB 2.4.0-1 (Release Build)
  • Issue of the topic: When changing the visibility of items the icons change although the states of the items do not change.

Hi,

I hope I haven’t overlooked anything because I found a few posts on issues with visibility and Basic UI but I couldn’t relate my observations to any of them.

I would like to configure some switches for automatic operations on my OH installation. The scenario is as follows:

  • There is one switch for an absence automatic which - if turned on - shall simulate presence by opening/closing shutters and turning lights on and off.
  • In case I am at home I still want the shutters to open and close at certain times, so I have three additional switches controlling when to operate the shutters.
  • The idea is that the states of the additional switches shall be irrelevant if the absence automatic is active.

All switches are dummies (i.e. not connected to any bindings). This is the items file:

Switch auto_Absence                 "Absence automatic [%s]"         <presence>
Switch auto_shutter_Sunset          "Close shutters on sundown [%s]" <switch>
Switch auto_shutter_Morning_Weekday "Open shutters weekdays [%s]"    <switch>
Switch auto_shutter_Morning_Weekend "Open shutters weekend [%s]"     <switch>

My sitemap file look as follows:

sitemap test label="Test" {
	Switch item=auto_Absence
	Switch item=auto_shutter_Morning_Weekday visibility=[auto_Absence!=ON]
	Switch item=auto_shutter_Morning_Weekend visibility=[auto_Absence!=ON]
	Switch item=auto_shutter_Sunset          visibility=[auto_Absence!=ON]
	Text   item=auto_shutter_Morning_Weekday visibility=[auto_Absence==ON]
	Text   item=auto_shutter_Morning_Weekend visibility=[auto_Absence==ON]
	Text   item=auto_shutter_Sunset          visibility=[auto_Absence==ON]
}

So the additional switches are displayed as read only if absence is activated (eventually they should be hidden, but this is used to demonstrate my issue).

So far for the setup. Now let’s get to my issue:
At some point the situation is as follows:

If I now turn the absence automatic on, the result is this:

As you can see the icon for “Open shutters weekdays” turns green although the state is still off.
When I turn the absence automatic back off the result is this:


Now all icons turned red although none of the states changed.

When reloading the page the icons are displayed correctly.
This behaviour is also observable if I use labelcolor instead of visibility on the additional switches.

Classic UI as well as the iOS and Android apps are working correctly.

Is this a known issue? Is there a work around?

Kind regards
Peter