Doing lights right / selectively hiding items

Every lighting zone in my house needs to have multiple items:

  • Toggle item (Switch)
  • Brightness (Dimmer)
  • Color Temperature (Dimmer)
  • Adaptive Mode (Switch)
  • Adaptive Schedule (String)

There are rules in the background that, when “adaptive mode” is on, change the brightness or color temperature of the light according to the set schedule in the schedule item. For example, the lights might dim during the night and change their color temperature to a warmer white.

Now, when I put these points into an OH3 semantic model like so:

I get this when I open the location page for the “Test Office”:

As you can see, all the points are displayed, however, I don’t always want this. Some rooms have 5+ individually controllable lights so there would be 25+ items in a long scrolling list and users would need to scroll through and hunt down the exact light they want. Instead, in this case, I want only the toggles to be visible with a little expansion button so that if users want to override the automatically set brightness, they can press and see the “expanded options” for that specific light. In other cases, for example rooms where there is only one light, I want the option to show the toggle switch and maybe the brightness slider by default.

Is it possible to do so?

1 Like

Yes, this is possible with custom widgets. The two most likely ways would be:

  1. remove all but the toggle items from the model and create a custom default widget for the toggle items that weekend to show widgets for the other items.
  2. create custom default widgets for all the items on the model and set the visibility of most of the widgets to depend on the state of a proxy item that toggles advanced properties.