Visibility usage?

Hey :slight_smile: Thank you all for Openhab!
So, im trying to make an informative section in my sitemap, where i can just click and see information on all things that are on and off in the iOS Openhab app.

Like this:
Text item=light_livingroom label="Light in livingroom is on" visibility=[livingroom_light!=OFF] icon="info"

wich will give me a textline when the light in livingroom is on in the info section,

Now i want to make an "All lights are off"
but i cant figure out the code to use :confused:

i tried this code, but it gives me all lights are off whenever i turn one off and has one on aswell… (not really usefull)

Text item=all_lights label="All lights are off!" visibility=[livingroom!=ON, bathroom!=ON] icon="info"

Thanks in advance :blush:

Do you have an all_lights Item? If not you would need to remove the item part.

Secondly, visibility will show that line if ANY of the clauses are true. So if either livingroom OR bathroom are != ON then your sitemap will show “All lights are off!”

You should put them into a Group and then use the state of the Group to determine if they are all OFF.

For example:

Group:Switch:OR(ON, OFF) all_lights

Then in your sitemap:

Text item=all_lights label="All lights are off!" visibility=[all_lights!=ON] icon="info"

Yep! that works :wink: thanks :smiley: