Only show lights that are on

Hi I am pretty new to Openhab - I’ve got it working using the bticino plugin for lighting.

I would like to be able to just see which lights are on. I have tried the function
Group:Switch:OR(ON, OFF) Total “how many [(%d)]” (Lights)

This works and displays a count of how many lights are on but when I go into the screen it show all the lights including the one’s which are off.

Is there a simple way to filter out lights which are off?

One way, maybe not as simple as you would like, is to define each one in the sitemap using the visibility feature. So the item will only appear if it’s on:

Text label="Lights" {
  Switch item=MyLight visibility=[MyLight==ON]
  Switch item=BathLight visibility=[BathLight==ON]
1 Like

Thanks that works fine! Nice and simple -