From 0f2f621f9a6ec74658885d185a942d485e804766 Mon Sep 17 00:00:00 2001 From: lolodomo Date: Sat, 16 Dec 2023 17:52:15 +0100 Subject: [PATCH] Sitemap: header row for chart/image/video/mapview/webview elements (#2173) * Sitemap: header row for chart/image/video/mapview/webview elements Signed-off-by: Laurent Garnier * Review comment addressed Signed-off-by: Laurent Garnier --------- Signed-off-by: Laurent Garnier --- ui/sitemaps.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ui/sitemaps.md b/ui/sitemaps.md index 0ad7e12f09..86241a6752 100644 --- a/ui/sitemaps.md +++ b/ui/sitemaps.md @@ -182,6 +182,7 @@ This provides the flexibility to present Items in the way desired in your home a - When an [Item]({{base}}/configuration/items.html) is defined, you have the opportunity to assign a label and/or an icon at that point. If no label or icon are specified in the Sitemap, then the label and/or icon you assigned to the Item will be displayed. Setting a value for `label` or `icon` or `staticIcon` of a Sitemap element will override the values defined for the linked Item. + There is an exception for chart, image, video, mapview and webview Sitemap elements: the item label is ignored and only the value of `label` is considered for the label. - The parameters `icon` and `staticIcon` are exclusive; both allow choosing the icon to show next to the element but `staticIcon` also indicates not to try to create a dynamic icon (using the current state of a linked item). The value of these two parameters can optionally be enclosed in double quotes. @@ -455,6 +456,7 @@ Webview item= [label=""] [icon=] [staticIcon=] [label=""] [icon=] [staticIcon=] [icon=] [staticIcon=] url="" [label=""] [refresh=xxxx] +Image [item=] [label=""] [icon=] [staticIcon=] url="" [refresh=xxxx] ``` This element type is able to present an image. The image must be available on a reachable website or webserver without password or access token. Alternatively, the image file (e.g. YourImageFile.png) may be stored locally in the $OPENHAB_CONF/html folder, and will be accessible through the static route, `https://:8080/static/YourImageFile.png`. +- `label` if set, a header row will be displayed containing this label and the icon. - `item` can refer to either an Image Item whose state is the raw data of the image, or a String Item whose state is an URL that points to an image. Some clients may not (yet) consider `item`. - `url` is the default URL from which to retrieve the image, if there is no associated Item or if the associated item's state is not a URL. - `refresh` is the refresh period of the image in milliseconds ("60000" for minutely updates). @@ -511,7 +515,7 @@ Image url="https://192.168.1.203:8080/?action=snapshot" refresh=10000 ### Element Type 'Video' ```java -Video [item=] [icon=] [staticIcon=] url="" [encoding="