diff --git a/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/internal/SitemapResource.java b/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/internal/SitemapResource.java index bf906e38d..88cb691a9 100644 --- a/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/internal/SitemapResource.java +++ b/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/internal/SitemapResource.java @@ -598,6 +598,7 @@ public class SitemapResource bean.service = chartWidget.getService(); bean.period = chartWidget.getPeriod(); bean.legend = chartWidget.getLegend(); + bean.forceAsItem = chartWidget.getForceAsItem(); if (chartWidget.getRefresh() > 0) { bean.refresh = chartWidget.getRefresh(); } diff --git a/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/internal/WidgetDTO.java b/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/internal/WidgetDTO.java index 8b1ec10ee..4efc9eb1b 100644 --- a/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/internal/WidgetDTO.java +++ b/bundles/org.openhab.core.io.rest.sitemap/src/main/java/org/openhab/core/io/rest/sitemap/internal/WidgetDTO.java @@ -51,6 +51,7 @@ public class WidgetDTO { public String service; public String period; public Boolean legend; + public Boolean forceAsItem; public String state; public EnrichedItemDTO item; diff --git a/bundles/org.openhab.core.model.sitemap/src/org/openhab/core/model/sitemap/Sitemap.xtext b/bundles/org.openhab.core.model.sitemap/src/org/openhab/core/model/sitemap/Sitemap.xtext index f83add362..4ee9d3f94 100644 --- a/bundles/org.openhab.core.model.sitemap/src/org/openhab/core/model/sitemap/Sitemap.xtext +++ b/bundles/org.openhab.core.model.sitemap/src/org/openhab/core/model/sitemap/Sitemap.xtext @@ -58,7 +58,8 @@ Video: Chart: 'Chart' (('item=' item=ItemRef) & ('label=' label=(ID | STRING))? & ('icon=' icon=Icon)? & - ('service=' service=(STRING))? & ('refresh=' refresh=INT)? & ('period=' period=ID) & ('legend=' legend=BOOLEAN_OBJECT)? & + ('service=' service=(STRING))? & ('refresh=' refresh=INT)? & ('period=' period=ID) & + ('legend=' legend=BOOLEAN_OBJECT)? & ('forceasitem=' forceAsItem=BOOLEAN_OBJECT)? & ('labelcolor=[' (LabelColor+=ColorArray (',' LabelColor+=ColorArray)* ']'))? & ('valuecolor=[' (ValueColor+=ColorArray (',' ValueColor+=ColorArray)* ']'))? & ('visibility=[' (Visibility+=VisibilityRule (',' Visibility+=VisibilityRule)* ']'))?); diff --git a/bundles/org.openhab.core.ui/src/main/java/org/openhab/core/ui/internal/components/UIComponentSitemapProvider.java b/bundles/org.openhab.core.ui/src/main/java/org/openhab/core/ui/internal/components/UIComponentSitemapProvider.java index 55283ff31..6ff2ca8f3 100644 --- a/bundles/org.openhab.core.ui/src/main/java/org/openhab/core/ui/internal/components/UIComponentSitemapProvider.java +++ b/bundles/org.openhab.core.ui/src/main/java/org/openhab/core/ui/internal/components/UIComponentSitemapProvider.java @@ -189,6 +189,8 @@ public class UIComponentSitemapProvider implements SitemapProvider, RegistryChan setWidgetPropertyFromComponentConfig(widget, component, "refresh", SitemapPackage.CHART__REFRESH); setWidgetPropertyFromComponentConfig(widget, component, "period", SitemapPackage.CHART__PERIOD); setWidgetPropertyFromComponentConfig(widget, component, "legend", SitemapPackage.CHART__LEGEND); + setWidgetPropertyFromComponentConfig(widget, component, "forceAsItem", + SitemapPackage.CHART__FORCE_AS_ITEM); break; case "Webview": WebviewImpl webviewWidget = (WebviewImpl) SitemapFactory.eINSTANCE.createWebview();