I’m working on my Basic UI Setup and would like to define / show some subsite’s depinding on items state…
Here a short example:
Text item=NW_ESPCAM valuecolor=[NW_ESPCAM==ON=“green”, ==OFF=“red”]
{
Video url=“http://192.168.100.56/mjpeg/1” encoding=“mjpeg”
}
in my overview I would just like to see the subsite with the videostream, when the item is online… by adding visibility=[NW_ESPCAM==ON] to the Video Url, the “subsite” is of cause empty, but will show up:
Sure, put the visibility on the “owning” Text widget. Visibility allows you to control a widget using a different Items state.
If I remember, this can be a bit buggy or sluggish under some circumstances, try it out. I think you may need to have the “visibility controlling” Item in a widget on its own account somewhere else in the sitemap, to get updates from openHAB.
Text item=NW_ESPCAM valuecolor=["green"] visibility=[NW_ESPCAM==ON]
{
Video url="http://192.168.100.56/mjpeg/1" encoding="mjpeg"
}
Text item=NW_ESPCAM valuecolor=["red"] visibility=[NW_ESPCAM!=ON]
You have not asked for a text display. You asked for a Default widget;
If you want the button-style Switch widget presentation (with mappings on the buttons) then I think you will have to explicitly ask for a Switch widget.
Switch icon="motion" ...
The MainUI sitemap editor had/has a number of bugs relating to advanced widget configuration.
Try editing in a text editor or VSCode.