Blocks in Sitemaps after Switch or Dimmer Items - possible?

Hi Team,

i’m quite new to openHAB but am stuck on my Sitemap Design. Searching this forum not really rendered results.

I use openHAB 2.1 Release on a Windows Server 2008 Machine.
In the documentation on Sitemaps it says about Blocks:

By encapsulating elements with curly brackets, multiple elements can be nested inside or behind others. The Frame element type is often used in combination with element blocks and a bit special in that matter. Frames are used to visually distinguish multiple elements of the same topic on one interface page. When using code blocks behind other element types like Text, Group or Switch, these UI elements will - in addition to their normal function - be links to a new view, presenting the nested elements. In the above example, multiple frames are defined and some elements are not visible on the main view but are accessible behind their parent element.

However, if trying that with either Switch or Slider Items, the SmartHome Designer and openHAB throw a syntax error:

	Switch item=g_5OG_Foyer label="Flur vorne" {
		Switch item=Light_5OG_FOY_Todesstern
		Slider item=Light_5OG_FOY_Todesstern	

What i want to achieve is to have a slider on the UI, where i can change the dimmer value and klick on the icon or somewhere else on the item to change to the nested block.
It seems though that contrary to the documentation, nested blocks are only possible with either Frame or Text items in the Sitemap.

Am i doing something wrong or is the documentation wrong?

Thanks for your feedback.

Best regards,

Hello @Klaas_Mertens,
I have written this part of the documentation and upon rereading it in your message I wonder what I was thinking.

NO. Not all elements can be the base for nested blocks. There is actually already an issue to improve this part of the documentation available. I’ve created it after the last time I did some changes to this article:

Thanks @ThomDietrich!

Although this is not my most favourite answer, i’d have to accept it. :slight_smile:
But no worries - the documentation for openHAB is actually much better then many i have read so far… :wink:

Anyone knows whether there is some improvement going on to actually allow Switches and Sliders to be the base for a nested block in Sitemaps?
It would greaty help in uncluttering my sitemaps.

Thanks for your feedback.

Best regards,

That’s great to hear.

I believe that the implementation of such a feature would be pretty easy but nobody ever considered it. Maybe some improvement decisions for the sitemap are in order.

Well - the Gold Standard i have experienced so far in Lighting Control on
the Smartphone is actually the Original HUE App - everything is accessible
via one widget - On/Off, Dimmer and Color - and also perfectly grouped in
all rooms and total control.

If the sitemap could be enhanced with a combined switch/slider + the
ability to group items below that (just on the sitemap, not in item groups - that’s a different matter), that’ll be a perfect replacement.

Just my 2 ct.

Could you post or link a screenshot of that? Just so I get your expectation?

I’ll take note of that.

For now I think you’ll be much happier building your own HABPanel UI. See:

I think the gotcha is retaining the Item’s control element and the > element to open the subpanal. That could have impacts across a lot of the UI subsystems as I suspect that they are all currently written with the assumption of there being zero or one control element and this would require two.

Does this have a fix now? I believe subpanel or block is allowed only on ‘Text’ and ‘Group’. anything else can have a block defined?

The op was for a feature request, not a big fix. To my knowledge no one has attempted to implement this.