Frame visibility does not work properly

I want the frame to be visible depending on the state of the “SUNISUP” switch.

If I use the following code the switches are invisable when the sun is up (just like i want them to be) but the frame is still there.

Frame label="Switches"
	{
		Switch item=SCHALTERA visibility=[SUNISUP==OFF]
		Switch item=SCHALTERB visibility=[SUNISUP==OFF]
		Switch item=SCHALTERC visibility=[SUNISUP==OFF]
		Switch item=SCHALTERD visibility=[SUNISUP==OFF]
	}

So when set the visibility syntax behind the frame syntax the sitemap won’t load at all.

Frame label="Switches" visibility=[SUNISUP==OFF]
	{
		Switch item=SCHALTERA visibility=[SUNISUP==OFF]
		Switch item=SCHALTERB visibility=[SUNISUP==OFF]
		Switch item=SCHALTERC visibility=[SUNISUP==OFF]
		Switch item=SCHALTERD visibility=[SUNISUP==OFF]
	}

I’ve search and found a similar post regarding the problem:

So the error should be fixed but it does not work for me.
I’m running openHAB 2.2.0

Since the issue was closed after the realeas of 2.2 you need to run the 2.3 snapshot to get this fix.

Thank you for the quick response and the help.

I’ll test it with version 2.3.

Does this work for you now with 2.3? I still have the same problem. My sitemap:

Frame label="Alarme und Warnungen" visibility=[NoWarningsFlag==OFF] {

From the log:

2018-10-18 21:28:43.773 [vent.ItemStateChangedEvent] - KNXgeneric_LeckageSolaranlage changed from ON to OFF
2018-10-18 21:28:44.084 [ome.event.ItemCommandEvent] - Item 'NoWarningsFlag' received command OFF

But the frame title still stays visible, the frame is empty.

NoWarningsFlag would need to have .state OFF (which it usually would following a command, but we can’t see that in your log)

OK thanks for the hint. I just reproduced and there is no change of value entry in the logfile, so I have to investigate why that is the case…

Unless you specify autoupdate=“false”, OH autoupdate psuedo-binding is enabled by default, and an Item would normally be updated to a new .state shortly after receiving a command.

I believe the command has to be appropriate for the Item type though, e.g. ON for a Switch type - not “ON” for example.

Even if a real binding updated it to something else soon after, you should see a record of state changes in the log, so you should be able to rule that out.

After checking all your valuable hints, it turned out the reason I didn’t see a state change in the log was quite simple: the item already had the state OFF before. The reason in my “problem” was a confusion of true and false in my rules. The behaviour of the frame visibility works fine.

Good to confirm :slight_smile: